Easiest way to copy data from old server to new server?
Page 1 of 1
Stige




Posts: 3542
Location: Finland
PostPosted: Fri, 14th Jun 2013 14:39    Post subject: Easiest way to copy data from old server to new server?
Simply, I want to move all user data, I guess moving /home/ folder will do it to my new host to avoid hassle for all users.

What would be the easiest way to achieve this?

Both servers run Debian.
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Fri, 14th Jun 2013 14:52    Post subject:
rsync Smile

Keeps all folders intact and everything.

While logged in on the new server:
- rsync -uvrz user@oldhost.com:/home/ /home/

(note the trailing slashes, they're important).

Also best to do it in a separate screen of course: screen -dmS filetransfer && screen -r filetransfer
Then hit CTRL+A and CTRL+D to detach once the transfer is running. You can reattach with screen -r filetransfer to see the progress.
Back to top
Stige




Posts: 3542
Location: Finland
PostPosted: Fri, 14th Jun 2013 14:58    Post subject:
Werelds wrote:
rsync Smile

Keeps all folders intact and everything.

While logged in on the new server:
- rsync -uvrz user@oldhost.com:/home/ /home/

(note the trailing slashes, they're important).

Also best to do it in a separate screen of course: screen -dmS filetransfer && screen -r filetransfer
Then hit CTRL+A and CTRL+D to detach once the transfer is running. You can reattach with screen -r filetransfer to see the progress.


Tyvm, now to just wait! Smile
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Fri, 14th Jun 2013 15:21    Post subject:
Also, run that command again after you've updated the hostnames to sync any changed/new files. Rsync does that too Wink
Back to top
Stige




Posts: 3542
Location: Finland
PostPosted: Fri, 14th Jun 2013 15:24    Post subject:
Werelds wrote:
Also, run that command again after you've updated the hostnames to sync any changed/new files. Rsync does that too Wink


Hehe even better, thanks, again.
Back to top
shole




Posts: 3363

PostPosted: Fri, 14th Jun 2013 19:41    Post subject:
naturally a chown pass is required for a new system with new user guids
Back to top
Stige




Posts: 3542
Location: Finland
PostPosted: Sat, 15th Jun 2013 16:55    Post subject:
How about SQL? Should I just export the whole database and import it back on the new server?

EDIT: Well it was only a few databases I had to backup so just dumped them invidually
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Sat, 15th Jun 2013 17:23    Post subject:
Late to the party, but if it's MySQL you can use mysqldump or simply copy the datafiles. Will also keep privileges intact Smile

Postgres...meh. Postgres requires a bit more work, as everything with that DBMS does. Postgres altogether is just horrible to work with, everything you want to do is extremely cumbersome.
Back to top
Stige




Posts: 3542
Location: Finland
PostPosted: Sat, 15th Jun 2013 17:25    Post subject:
Werelds wrote:
Late to the party, but if it's MySQL you can use mysqldump or simply copy the datafiles. Will also keep privileges intact Smile

Postgres...meh. Postgres requires a bit more work, as everything with that DBMS does. Postgres altogether is just horrible to work with, everything you want to do is extremely cumbersome.


I thought mysqldump only worked for invidual databases? Or can it actually do one huge dump of everything you have? :O
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group