On 02/02/2018 10:09 AM, stan wrote: > On Fri, 2 Feb 2018 08:36:25 -0500 > bruce <badouglas@xxxxxxxxx> wrote: > >> Looking to completely duplicate/replicate one server to >> another.Running Centos/Fed. I've seen a number of different >> articles/etc on different ways of doing this. >> >> Assuming I'm not using chef/puppet/ansible/etc can anyone give >> thoughts on best approaches for this. Articles are cool as well. >> >> Key Items: >> -Need to Maintain same users/passwds >> -Need to maintain all dirs/files heirarchy >> -Need all system/3rd party processes/apps running >> -All config/cron files >> -All port/db/ssh functions.. >> >> I'm testing the process to do this on cheap cloud vms so I can screw >> up as I figure out best approach for this. >> >> Thoughts/comments? > > I would use > # rsync -C -x -u -a -v -A -X / /[new mount point without a trailing /] > > You will have to clean up /boot and /etc/fstab so it will boot properly. > > You can read the rsync docs to see what it is doing. If you aren't worried about the actual boot environment and /dev items, I back up using rsync -avXA --exclude-from=/etc/skipdirs.rsync / /newmountpoint "/newmountpoint" is typically where I mount backup media such as "/media/3TB-External-Drive" The file "/etc/skipdirs.rsync" contains: /proc/* /sys/* /dev/* /media/* /var/log/journal/* **/.cache/google-chrome/*** **/.ccache/*** /BACKUPS/* /run/media/* The first three are sorta mandatory as they're transient and won't translate to a new system. The fourth keeps me from looping through mounted media (such as the backup media) and the rest just keep from backing up logs and crap that the new machine doesn't care about or need. This has worked for me for backup purposes and restoring machines from fresh OS installs. If you need LIVE backup or full bare-metal restoration media, there are things like Clonezilla, mondorestore, Acronis (commercial) and lots of others. YMMV (your mileage may vary) ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - He who laughs last thinks slowest. - ---------------------------------------------------------------------- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx