Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #54466

Re: Remote backups with rsync - discussion / tutorial, I guess.

From Dan Purgert <dan@djph.net>
Newsgroups alt.os.linux
Subject Re: Remote backups with rsync - discussion / tutorial, I guess.
Date 2019-03-18 11:49 +0000
Organization A noiseless patient Spider
Message-ID <slrnq8v1ej.n0k.dan@djph.net> (permalink)
References <slrnq8nr52.n0k.dan@djph.net> <q6irj5$u2v$1@dont-email.me>

Show all headers | View raw


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Daniel60 wrote:
> Dan Purgert wrote on 16/03/2019 5:19 AM:
>> 
>> I know this comes up from time to time, and there are a bazillion
>> tutorials about it spread across the web, but it's been quiet in here
>> lately, and I just went through revamping my setup a few weeks ago.
>> Maybe someone will find it helpful.
>> [...]
>> 
> Dan, thank you for posting this little Tutorial on rsync. I'm using MGA6 
> and I've been meaning to create a back-up of my Laptop's internal 500GB 
> HD to my external 3TB HD for sometime .... especially since I recently 
> found out the back-up that I thought I had made was useless (only about 
> 500MB of what I figured should have been about 500GB)!!
>
> I have two questions, however, ....
>
> 1.	When specifying the destination location, can I make it Date 
> dependant?? i.e. Can I use something like ..
>
> rsync -avP  /sda1 /media/($Date)/sda1
>
> so that today's date will be included as part of the destination
> location??

Did a quick test, and it works perfectly fine running this in my $HOME
dir:

  mkdir testbackup
  rsync -avP News/ testbackup/$(date +Y%M%d)

It resulted in:

  $HOME/testbackup/20190318/(everything from News)

If I ran "rsync -avP News testbackup/($date +Y%M%d)", I'd have gotten
"$HOME/testbackup/20190318/News/(stuff)".

NOTE -- if your date has spaces (e.g. the default -- "Mon Mar 18 [h:m:s]
TZ 2019"), it will break rsync.  If you want that date format, then
you'll need to use quotes to keep the shell from breaking up the spaces.
Something like this - rsync -avP News testbackup/"$(date)".

>
> 2.	You mention setting up a cron job to 'automate' the back-up. On my 
> internal HD I have several partitions, so can I set up a cron job to 
> back-up all of the 'useful' partitions but not the SWAP partition ... 
> something like ...
>
> For SDA=1 to 15 (i.e. I have 15 partitions to back-up)
> If SDA=5 then Next (i.e. if sda5 is SWAP file, skip it)
> rsync -avP  /sda(SDA) /media/($Date)/sda(SDA)
> Next

I've never tried it using /dev as a source.  I imagine it might work,
but I'd probably just do something like 

  rsync -avP /dev/sda1/mountpoint /path/to/backup/dir
  [...]
  rsync -avP /dev/sda15/mountpoint /path/to/backup/dir

Or, more likely I'd be running different cronjobs or scripts to handle
one-off updates -- for example, I only backup /etc when I make a change
(I have a script called something like "updetc" which is pretty much:

  #!/bin/bash
  # co/ci commands from 'rcs' package
  co -l $1
  vi $1
  ci -u $1
  rsync /etc /path/to/backup

And yes, everyone's gonna flip out that it's quick and dirty and assumes
no spaces in the filename, and so forth.  Don't use this as an example
of "good bash scripting"

>
> Thanks for your consideration. I've tried reading up on 'rsync' in the 
> MGA manual but, it seems to (uneducated) me, the manual is written for 
> those who know what they're doing to check up on themselves!!
>

That's every manpage ever :)


-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAlyPhdEACgkQjhHd8xJ5
ooHerwgAp5hGDNJE1I9Lu/K9t0qMlV1K7ElpnP3r6Ayv2sfcykG+fkKrIdJcDEyx
4+Rj7RuYXHWhkZLie8mBiptmLJNsnUzsM6p3tCj4/Q3Av99ikHUjCQa/YUqsvthi
PFl+7NFOmyGGAwYFaaX6cClLqQtKODWdZRWkTmyQgtLLIODh+qhzLLviEwqNiKuE
Vq4pOBKkVzJvncACnLiOwMYtBzzx2x3MmPUHiHqrrZ9/ATGVP208jyP59yHoPtW2
QuazMMN1+1X4yLqUc9XzP/j9NFm06WdwcS2qfd20LXQv98ZV1EILFWCmYc37IECj
Z4B32ULkpYvp7ACHDC7NZs3CClHYjA==
=c+dq
-----END PGP SIGNATURE-----

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281

Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-15 18:19 +0000
  Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-15 19:06 +0000
    Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-18 11:13 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-18 16:40 +0000
        Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-19 10:24 +0000
  Re: Remote backups with rsync - discussion / tutorial, I guess. Mike Easter <MikeE@ster.invalid> - 2019-03-15 16:17 -0700
  Re: Remote backups with rsync - discussion / tutorial, I guess. jjb <invalid@invalid.nl> - 2019-03-16 10:14 +0100
    Re: Remote backups with rsync - discussion / tutorial, I guess. Chris Elvidge <chris@mshome.net> - 2019-03-16 09:26 +0000
    Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-16 16:54 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-16 16:57 +0000
  Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-16 11:06 +0000
    Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-17 12:52 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. Allodoxaphobia <trepidation@example.net> - 2019-03-17 17:32 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. Java Jive <java@evij.com.invalid> - 2019-03-18 12:29 +0000
        DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-18 16:32 +0000
          Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Java Jive <java@evij.com.invalid> - 2019-03-18 16:40 +0000
          Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "R.Wieser" <address@not.available> - 2019-03-18 17:59 +0100
            Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Adrian Caspersz <email@here.invalid> - 2019-03-18 17:51 +0000
              Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "R.Wieser" <address@not.available> - 2019-03-18 19:00 +0100
          Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "Carlos E.R." <robin_listas@es.invalid> - 2019-03-18 20:16 +0100
          Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Dan Purgert <dan@djph.net> - 2019-03-19 10:19 +0000
            Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 12:06 +0100
              Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Dan Purgert <dan@djph.net> - 2019-03-19 12:42 +0000
                Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 19:36 +0100
                Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Dan Purgert <dan@djph.net> - 2019-03-20 10:17 +0000
            Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) Java Jive <java@evij.com.invalid> - 2019-03-19 13:24 +0000
              Re: DOS/Windows "COPY" command (Was: Remote backups with rsync - discussion / tutorial, I guess.) "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 19:38 +0100
        Re: Remote backups with rsync - discussion / tutorial, I guess. Adrian Caspersz <email@here.invalid> - 2019-03-18 17:47 +0000
          Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-19 00:29 +0000
            Re: Remote backups with rsync - discussion / tutorial, I guess. Chris Elvidge <chris@mshome.net> - 2019-03-19 09:02 +0000
            Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 12:07 +0100
              Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-19 13:57 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 19:45 +0100
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 08:52 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-20 11:24 +0100
                Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-20 11:31 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 15:03 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-20 17:05 +0000
                Why I don't like "rsync"... (Was: Remote backups with rsync - discussion / tutorial, I guess.) gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-20 12:08 +0000
                Re: Why I don't like "rsync"... (Was: Remote backups with rsync - discussion / tutorial, I guess.) Chris Elvidge <chris@mshome.net> - 2019-03-20 13:04 +0000
                Re: Why I don't like "rsync"... Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 13:47 +0000
                Re: Why I don't like "rsync"... "Carlos E.R." <robin_listas@es.invalid> - 2019-03-22 19:41 +0100
                Re: Why I don't like "rsync"... gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-24 09:36 +0000
                Re: Why I don't like "rsync"... Richard Kettlewell <invalid@invalid.invalid> - 2019-03-24 09:59 +0000
                Re: Why I don't like "rsync"... gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-24 10:36 +0000
                Re: Why I don't like "rsync"... Richard Kettlewell <invalid@invalid.invalid> - 2019-03-24 11:12 +0000
                Re: Why I don't like "rsync"... gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-24 11:29 +0000
                Re: Why I don't like "rsync"... Richard Kettlewell <invalid@invalid.invalid> - 2019-03-24 13:04 +0000
                Re: Why I don't like "rsync"... gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-24 13:16 +0000
                Re: Why I don't like "rsync"... Dan Purgert <dan@djph.net> - 2019-03-25 10:37 +0000
                Re: Why I don't like "rsync"... (Was: Remote backups with rsync - discussion / tutorial, I guess.) William Unruh <unruh@invalid.ca> - 2019-03-20 15:19 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-20 12:44 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 13:58 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-20 15:00 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 15:49 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 17:57 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 23:39 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-21 08:15 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-21 09:00 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-21 13:11 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-21 14:03 +0000
                rsync --archive Ivan Shmakov <ivan@siamics.net> - 2019-03-21 18:10 +0000
                Re: rsync --archive Richard Kettlewell <invalid@invalid.invalid> - 2019-03-21 21:42 +0000
                Re: rsync --archive "Carlos E.R." <robin_listas@es.invalid> - 2019-03-22 19:54 +0100
                Re: rsync --archive Ivan Shmakov <ivan@miko.siamics.net> - 2019-03-23 04:32 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-21 18:54 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-22 10:03 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-21 18:50 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-21 21:31 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-22 19:48 +0100
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 15:07 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 14:57 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Richard Kettlewell <invalid@invalid.invalid> - 2019-03-20 15:54 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 17:49 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-21 08:21 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-19 20:50 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 02:40 +0000
                Re: Remote backups with rsync - discussion / tutorial, I guess. gazelle@shell.xmission.com (Kenny McCormack) - 2019-03-20 08:19 +0000
              Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-20 02:37 +0000
        Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-19 19:53 +0000
          Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-19 21:25 +0100
          Re: Remote backups with rsync - discussion / tutorial, I guess. Java Jive <java@evij.com.invalid> - 2019-03-19 22:04 +0000
    Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-18 11:20 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-18 13:07 +0100
        Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-18 12:43 +0000
          Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-18 14:32 +0100
            Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-18 16:44 +0000
  Re: Remote backups with rsync - discussion / tutorial, I guess. Daniel60 <daniel47@eternal-september.org> - 2019-03-16 23:52 +1100
    Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-18 11:49 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. "Carlos E.R." <robin_listas@es.invalid> - 2019-03-18 13:11 +0100
        Re: Remote backups with rsync - discussion / tutorial, I guess. Dan Purgert <dan@djph.net> - 2019-03-18 12:45 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. William Unruh <unruh@invalid.ca> - 2019-03-18 18:12 +0000
        Re: Remote backups with rsync - discussion / tutorial, I guess. Chris Elvidge <chris@mshome.net> - 2019-03-18 19:12 +0000
          Re: Remote backups with rsync - discussion / tutorial, I guess. Chris Elvidge <chris@mshome.net> - 2019-03-18 19:19 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. Daniel60 <daniel47@eternal-september.org> - 2019-04-02 22:37 +1100
  Re: Remote backups with rsync - discussion / tutorial, I guess. jjb <invalid@invalid.nl> - 2019-03-19 12:49 +0100
    Re: Remote backups with rsync - discussion / tutorial, I guess. Jasen Betts <jasen@xnet.co.nz> - 2019-03-19 21:08 +0000
      Re: Remote backups with rsync - discussion / tutorial, I guess. jjb <invalid@invalid.nl> - 2019-03-20 12:51 +0100
  Re: Remote backups with rsync - discussion / tutorial, I guess. jjb <invalid@invalid.nl> - 2019-03-20 10:37 +0100
    Re: Remote backups with rsync - discussion / tutorial, I guess. jjb <invalid@invalid.nl> - 2019-03-20 12:53 +0100

csiph-web