Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks , how can i replicate the Lamp settings? what are the files that i need to edit? –  Srikanth Oct 21 '13 at 10:19
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.