Re: rsync or replacement backup



Mike Bird wrote:
On Mon May 19 2008 12:58:01 Karl Larsen wrote:

karl@karl-desktop:~$ cat /root/bin/backup
# This file is designed to backup my Ubuntu to the USB Hard Drive using
rsync
# Karl Larsen, 26 Feb 08
rsync -avz /boot /media/disk/


Omit the "-z". It compresses traffic over networks but it
doesn't help with local copies.


rsync -avz /bin /media/disk/
rsync -avz /dev /media/disk/


You probably don't want to ever restore /dev, so backing it up
could be regarded as a waste of time. However it's small and
the information from a /dev backup is sometimes useful in
emergencies so go ahead and back it up.


rsync -avz /etc /media/disk/
rsync -avz /lib /media/disk/
rsync -avz /opt /media/disk/
rsync -avz /root /media/disk/
rsync -avz /sbin /media/disk/
rsync -avz /srv /media/disk/
rsync -avz /sys /media/disk/


/sys is a special filesystem like /proc. I wouldn't back it up.


rsync -avz /tmp /media/disk/


Most people don't backup /tmp, /var/tmp, ... to save time and space.


rsync -avz /usr /media/disk/
rsync -avz /var /media/disk/
rsync -avz /initrd /media/disk/

Of course /sbin is the current sbin directory. /media/disk/ is where
the USB hard disk is located.

So does anyone know a good one line way to do the same thing?


Here's a one-liner. You might want to adjust the exclusions
to suit your needs. Make sure the correct disk is mounted on
/media/disk before starting. [With rsync v3 you can add "-X" :-) ]

rsync -va -SHA --partial --delete --delete-excluded --exclude=/media --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/var/spool/squid --exclude=/var/tmp --exclude=/mnt --exclude='/home/*/.mozilla/firefox/*/Cache' / /media/disk/

--Mike Bird


Hi Mike I like yours better than mine. I hear all your do not do and
am going to try the --exclude= thing because it makes sense, if it
works. I'm using this now:

sudo rsync -avz /root /boot ... /usr : /mnt

and it seems to be working. It does complain about not being able to
forward some files.

Karl


--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: rsync or replacement backup
    ... # This file is designed to backup my Ubuntu to the USB Hard Drive using ... the USB hard disk is located. ...
    (Ubuntu)
  • Re: Ubuntu 8.04 and Firefox 3 Beta 5
    ... blame anybody---I'm using FOSS which comes with baggage. ... On a 386-based box (and Ubuntu doesn't support anything else any ... I'd be tempted to suggest that if you habitually upgrade your OS ... internet research I found those about 30 websites I didn't backup my ...
    (Ubuntu)
  • Re: Moving open files
    ... live secretary or office manager doing the same things you now have your ... Could one not remove a file from a binder, ... Ubuntu documentation that the user could be reasonably expected to ... Backup, Backup and Backup. ...
    (Ubuntu)
  • Re: System Backup
    ... My favourite tape/network/disk backup solution, ... amanda-client - Advanced Maryland Automatic Network Disk Archiver (Client) ... looking for something that's backup my ubuntu and my data for a local ...
    (Ubuntu)
  • Re: Stubborn Misplaced File
    ... Good thing I ordered the Ubuntu CD just in case and had it on hand ... Backup & Restore OE Data ... MS MVP-IE, Mail, Security, Windows Client - since 2002 ... Specify a different file name. ...
    (microsoft.public.windowsxp.general)