Hello, I've got some CentOS 5.3 servers that I want to clone to a backup server, possibly a VM machine. I want this to be done while the server is up, and keep it synced at least once a day. I've done this already by using RSYNC, but here's the twist: the backup machine could be different hardware, and needs to have a different IP address (so they don't conflict). My question: exactly what files should I exclude, so that I copy everything -except- what pertains to the ethernet card(s), and hard drive mounts. I know of at least: /etc/fstab /etc/sysconfig/network-scripts/* /var/run /proc But what else? The original servers may have software raid, so those files can't be copied either. Bob
Bob Puff wrote:> Hello, > > I've got some CentOS 5.3 servers that I want to clone to a backup server, > possibly a VM machine. I want this to be done while the server is up, and > keep it synced at least once a day. > > I've done this already by using RSYNC, but here's the twist: the backup > machine could be different hardware, and needs to have a different IP address > (so they don't conflict). > > My question: exactly what files should I exclude, so that I copy everything > -except- what pertains to the ethernet card(s), and hard drive mounts. I know > of at least: > > /etc/fstab > /etc/sysconfig/network-scripts/* > /var/run > /proc > > But what else? The original servers may have software raid, so those files > can't be copied either./dev, /sys and /boot - but it is a good idea to use rsync's --one-file-system option and explicitly copy the filesystems you want. Also, if you are changing files underneath running applications, expect some wierd things to happen. It would be safer to plan to reboot the backup if you ever need to activate it - and if you do that you could have it running from a different root for the copies. -- Les Mikesell lesmikesell at gmail.com
Bob Puff wrote:> Hello,> > My question: exactly what files should I exclude, so that I copy > everything -except- what pertains to the ethernet card(s), and hard > drive mounts. I know of at least: > > /etc/fstab > /etc/sysconfig/network-scripts/* > /var/run > /proc >I am not sure what you want to achieve, but if you want just to Backup, maybe specialized Backup Software like Bacula (http://www.bacula.org/) could be a better solution for you (Sorry, could not resist ;-) That said, if you want to do it that way, my exclude list (maybe) could be: /etc/mtab /etc/ssh/*_key{,.pub} /etc/hosts (maybe) /etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/network-scripts/route-* (not sure, maybe other files too) /proc/* /selinux/* /sys/* /dev/* /tmp/* /*lost+found/* (maybe) /.auto* If the partition Layout differs /etc/fstab and not lost+found for not existing file systems maybe. Well, I done that years ago multiple times for one shot cloning not for regular Backups and i remember beeing surprised that it worked, its kinda hackish i believe. I am sure i forgot something important paths in list above. -- best regards, markus