Results 1 to 2 of 2
Hello i have a CentOs server withe a few different web and media servers on it and a lotts of media encoding / modifications services running on it, i dont ...
- 05-18-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 1
Tips for my frist server migration?
Hello i have a CentOs server withe a few different web and media servers on it and a lotts of media encoding / modifications services running on it, i dont remember all the modules i installed to get all of my media php scripts to worke.
Now i need to move to a new CentOs server and whould like to have the exakt same setup.
What tips can u give me to do this?
Are there a little magic clone comand hidden in linux somewhere?
Thanks!
- 05-20-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
well, to answer your question, Yes! The command is dd, it would absolutely duplicate your system, bit for bit - but i think that would be overkill (and it can take a looooooooong time and can use up a lot of space).
But if you feel so inclined, your command would like something like:
That would back up your first partition (1) on your first drive (sda) to a file. Running this on a "live" system is inadvisable though. I'd boot a Live distro and then mount the filesystems and run it there.Code:dd if=/dev/sda1 of=/tmp/diskApart1.img bs=1024
I'd avoid dd though, if I could - you'd probably be fine with a few tar commands, or maybe even rsync - if both machines are up at the same time. If you're not sure which files/dirs to tar up, you can always just tar up everything, too (watch out, though /usr is huge). Again, boot into a Live distro, though, to be sure to get everything. If you tar up everything, do it in chunks (makes things more manageable), e.g.:
In any event, do NOT tar up /proc, /sys or /dev - they are handled by the OS.Code:tar cpf /tmp/backup-root.tar /bin /boot /lib /opt /root /sbin /tmp tar cpf /tmp/backup-home.tar /home tar cpf /tmp/backup-etc.tar /etc tar cpf /tmp/backup-var.tar /var tar cpf /tmp/backup-usr-share.tar /usr/share tar cpf /tmp/backup-usr-lib.tar /usr/lib tar cpf /tmp/backup-usr-root.tar /usr/(everything else)
hth


Reply With Quote