Hello List, 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 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? Any ideas are welcome :) Cheers, Mario
Matt McCutchen
2008-May-30 20:50 UTC
How to backup files without destroying the destination?!
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:/backupFor 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
Matt McCutchen
2008-May-31 21:52 UTC
How to backup files without destroying the destination?!
On Sat, 2008-05-31 at 08:57 +0200, ml wrote:> > 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/ ). > > > So you are basically saying i need to backup my backups? :)Perhaps you could think of it that way, but I'm not suggesting recopying any data after it is already on ServerB. I'm just suggesting copying ServerA's data to a different destination on ServerB each time so that, if ServerA goes bad, you'll still have a destination made when it was good. To prevent the space usage on ServerB from growing indefinitely, you could periodically check the latest destination for any corruption and, if it is good, delete all the other ones. 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/20080531/aa813915/attachment.bin
Leonid Chaichenets
2008-Jun-08 14:05 UTC
How to backup files without destroying the destination?!
Hello,> To prevent the space usage on ServerB from growing indefinitely, > you could periodically check the latest destination for any corruption > and, if it is good, delete all the other ones.... or you could try dirvish (www.dirvish.com): for every new backup it creates a directory where every file which hasnt changed since the last backup is just a hard link to the old one. This way a backup hierarchy costs you almost no extra disk scpace. -- Greets, Leonid Chaichenets.