Re: rsync or replacement backup
- From: Karl Larsen <k5di@xxxxxxxxxx>
- Date: Mon, 19 May 2008 15:15:21 -0600
Mike Bird wrote:
On Mon May 19 2008 12:58:01 Karl Larsen wrote:Hi Mike I like yours better than mine. I hear all your do not do and
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
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
- Follow-Ups:
- Re: rsync or replacement backup
- From: Kent Borg
- Re: rsync or replacement backup
- From: Mike Bird
- Re: rsync or replacement backup
- References:
- rsync or replacement backup
- From: Karl Larsen
- Re: rsync or replacement backup
- From: Mike Bird
- rsync or replacement backup
- Prev by Date: Re: rsync or replacement backup
- Next by Date: Re: Is USB over ethernet possible
- Previous by thread: Re: rsync or replacement backup
- Next by thread: Re: rsync or replacement backup
- Index(es):
Relevant Pages
|