Re: rsync or replacement backup
- From: Mike Bird <mgb-ubuntu@xxxxxxxxxxxx>
- Date: Mon, 19 May 2008 13:36:26 -0700
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
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: rsync or replacement backup
- From: Karl Larsen
- Re: rsync or replacement backup
- From: John K Masters
- Re: rsync or replacement backup
- References:
- rsync or replacement backup
- From: Karl Larsen
- rsync or replacement backup
- Prev by Date: Re: rsync or replacement backup
- Next by Date: Re: partitioning hard drive
- Previous by thread: Re: rsync or replacement backup
- Next by thread: Re: rsync or replacement backup
- Index(es):
Relevant Pages
|