1

I have to move my entire website with the source code , databases and other supporting software modules from one system to another. Both the systems have CentOs Operating system. Using putty I have to move the data. To be safe, I created a new user with root access Right now i have freshly installed LAMP and phpmyadmin on the newer system The configuration settings( httpd.conf , php.ini and various other unknown settings), file permissions, folder permissions and other things must be same.what are the steps to be followed to accomplish this

2 Answers 2

2

I typically use rsync. Having root user makes process even easier because you can guarantee to preserve permissions.

ssh into new Linux box and execute this rsync command:

root@new-host# rsync -avl --delete --partial --progress root@old-host:/old/dir/ /new/dir/

used rsync flags meaning:

  • -a - archive mode or recursive copy
  • -v - verbose
  • -l - preserve symlinks
  • --delete - delete files on target which do not exist in source
  • --partial - resume copy on huge files
  • --progress - show progress indicator

This command will make sure that /new/dir/ on new server is exactly the same as /old/dir/ on old one. Beauty of rsync is that you can interrupt this command if your tree is huge, or execute it many times - each time it will work faster and get you closer to final goal of having two identical trees.

1
  • Thanks , how can i replicate the Lamp settings? what are the files that i need to edit?
    – Srikanth
    Oct 21, 2013 at 10:19
0

I was able to transfer successfully using scp command

The below command has to be executed from the source

scp -r @:

-r recursice file transfer

All permissions were retained

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .