I do apologize if this has been discussed previously. Looking thru some of the archives I wasn't able to clearly answer my question, only find bits & pieces. Situation: I have a web & mail server (production) and a backup machine. The two machines are near identical as far as hardware & software installation. I use the backup machine as a mirror of the main. If for any reason mail functionality dies I can redirect to the mirror, etc. My question is can I use rsync to safely mirror the entire drive? Currently I have just mirrored /var/www/ & /var/mail/. I'm sure there are other files that may be regularly updates (ie; logs) and I want to make sure the backup-mirror is completely up to date. Is it safe to just rsync [remote]:/ [local];/ ? Would the /dev or other folders cause issues with this? Would it be safer to implement a more detailed rsync script excluding certain areas? I do appreciate the help.
Christer Edwards wrote:> > I do apologize if this has been discussed previously. Looking thru > some of the archives I wasn't able to clearly answer my question, only > find bits & pieces. > > Situation: > I have a web & mail server (production) and a backup machine. The two > machines are near identical as far as hardware & software > installation. I use the backup machine as a mirror of the main. If > for any reason mail functionality dies I can redirect to the mirror, > etc. > > My question is can I use rsync to safely mirror the entire drive? > Currently I have just mirrored /var/www/ & /var/mail/. I'm sure there > are other files that may be regularly updates (ie; logs) and I want to > make sure the backup-mirror is completely up to date. > > Is it safe to just rsync [remote]:/ [local];/ ? Would the /dev or > other folders cause issues with this? Would it be safer to implement > a more detailed rsync script excluding certain areas? > > I do appreciate the help. >>From past experience (ok, real newbie-like)even rsyncing everything as a means of cloning a system is survivable. There's a few things like /proc things like pid files in /var/run/ maybe some sockets that would get in the way some things in /etc that distinguish the primary from the backup ---a few things you are better off if you don't. Guessing, you probably want some distinction between the backup running as backup and the backup running because the primary is dead. Somebody that actually knows the stuff can probably give you good advice. What I've seen indicates excellent chances of survivable even without doing any critical thinking. Probably the more interesting issue is when the primary fails DURING the backup. (and you really need the backup you just destroyed).
Hi, On Sat, 4 Feb 2006, Christer Edwards wrote:> I do apologize if this has been discussed previously. Looking thrusome of the archives I wasn't able to clearly answer my question, only find bits & pieces. Situation: I have a web & mail server (production) and a backup machine. The two machines are near identical as far as hardware & software installation. I use the backup machine as a mirror of the main. If for any reason mail functionality dies I can redirect to the mirror, etc. My question is can I use rsync to safely mirror the entire drive? Currently I have just mirrored /var/www/ & /var/mail/. I'm sure there are other files that may be regularly updates (ie; logs) and I want to make sure the backup-mirror is completely up to date. Is it safe to just rsync [remote]:/ [local];/ ? Would the /dev or other folders cause issues with this? Would it be safer to implement a more detailed rsync script excluding certain areas? /proc and /sys need to be excluded. Cheers -e -- Eberhard Moenkeberg (emoenke@gwdg.de, em@kki.org)
Christer Edwards wrote...> Is it safe to just rsync [remote]:/ [local];/ ? Would the /dev or > other folders cause issues with this? Would it be safer to implement > a more detailed rsync script excluding certain areas?If you're using Linux (you didn't show or tell) you should indeed exclude /proc and /sys. Not doing this wouldn't do much harm except wasting bandwidth and storage, especially if you're kernel still shows the physical memory in /proc/kcore :-) I've successfully used such a backup for a recovery after the original system crashed. But do not rely on that before you've tested your setup. Especially the "--numeric-ids" option is probably a good idea unless you've virtually identical systems. Christoph
On Sat, Feb 04, 2006 at 12:37:35PM -0700, Christer Edwards wrote:>Is it safe to just rsync [remote]:/ [local];/ ? Would the /dev or >other folders cause issues with this? Would it be safer to implement >a more detailed rsync script excluding certain areas?As already mentioned, there are some issues to watch out for /var/run, /proc, mail spool, and others. You are probably better off with a reliable imaging & configuration mngt system; and maybe a hot spare. Key word here is management, rather than rsync what the os has written, image the system with the os and apply your current configurations and data from backup or repository; as required. // George -- George Georgalis, systems architect, administrator <IXOYE>< http://galis.org/ cell:646-331-2027 mailto:george@galis.org