On 08 Apr 07, at 08:58, Adam Chlipala wrote:

> I think it probably makes sense now to create an archive of all
> non-restorable disk contents (e.g., /home, parts of /etc and /var) and
> have an admin download it.  Can anyone recommend the best command  
> to use
> to do this?  (The recommendation should include the exact paths that
> should be backed up.)


I'm a little late to this party, but here's what I use.  rsync over  
ssh is great because it's differential, which means I've been able to  
keep a multi-deca-gigabyte GIS archive backed up even over a 128Kbps  
ISDN connection.  (The initial backup was conducted via a USB hard  
drive that was shipped using a courier, but subsequent differential  
backups over the net finish overnight.)  This solution will not  
compress the backed-up files, so you'll use just as much disk space  
on the target as they take up on the source.


# This command will not delete files on the backup target
# that no longer exist on the backup source.  So, you'll slowly
# accumulate old files on the target interspersed with the current
# files if you run this repeatedly over time.
#
/usr/bin/rsync --archive --progress --stats --exclude-from=/backup/ 
exclude-from.txt -e ssh -a / [EMAIL PROTECTED]:/path/to/ 
backup/hostname/


# This command *WILL* delete files on the backup target that
# no longer exist on the backup source, and will *not* backup
# any paths contained in the text file '/backup/exclude-from.txt'.
# Because this example contains the "--delete" flag, I've included
# the "--dry-run" flag and the "--max-delete=" flag.  It always sets
# my heart pounding the first time I run this on a system - am I
# really specifying the source and target in the proper order, or
# am I about to delete stuff on the source that I don't want to delete?

/usr/bin/rsync --archive --stats --dry-run --progress --delete -- 
delete-excluded --delete-after --max-delete=50 --exclude-from=/backup/ 
exclude-from.txt -e ssh -a / [EMAIL PROTECTED]:/path/to/ 
backup/hostname/



# Here's a sample "exclude-from.txt" file
#
/proc
/dev
/sys
/tmp
/var/tmp
/var/named/chroot/proc
/var/named/chroot/dev
/usr/local/src
/usr/src
/var/cache
/lib



Graham


_______________________________________________
HCoop-SysAdmin mailing list
[email protected]
http://hcoop.net/cgi-bin/mailman/listinfo/hcoop-sysadmin

Reply via email to