How to backup files without destroying the destination?!

Matt McCutchen matt at mattmccutchen.net
Fri May 30 20:50:13 GMT 2008


On Fri, 2008-05-30 at 21:22 +0200, ml wrote:
> i would like to copy/mirror/rsync the backup files from ServerA to ServerB.
> Since i must assume that ServerA is hacked (public server with a few 
> services), i would like to "pull" the files to ServerB (save server with 
> no services).
> 
> That means i do something like: rsync -avz ServerA:/backup ServerB:/backup

For a pull, you would run the command on ServerB and leave out the
destination hostname:

rsync -avz ServerA:/backup /backup

> IF ServerA gets hacked and the files get zeroed out (every file has 
> rubbish or 0 bytes), then i would also destroy my files on my 
> destination ServerB.
> 
> Whats a good way to prevent this?

Instead of just one backup, keep a series of backups on ServerB and
sanity-check them periodically.  That way, if ServerA is hacked, you'll
have a period of time to notice and recover from a good backup.  To save
space, you could use a tool that hard-links unchanged files; my personal
favorite is rsnapshot ( http://www.rsnapshot.org/ ).

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080530/89e28e18/attachment.bin


More information about the rsync mailing list