Results 1 to 4 of 4
Hi, my current host is not providing me with a backup of my websites on my server, they're pissed 'cuz I've purchased a new server with someone else and they're ...
- 02-03-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 1
Rsync Help
Hi, my current host is not providing me with a backup of my websites on my server, they're pissed 'cuz I've purchased a new server with someone else and they're making me jump through hoops to get my data migrated.
I'm new to server administration but I heard a little about Rsync and that may be the best way for me to move my sites (132GB) to my new server.
Does anyone know where I can find a good tutorial for Rsync? I've been looking but haven't had much luck.
If anyone can point me in the right direction I'd greatly appreciate it. Thanks and I hope to be more active in this forum
- 02-03-2010 #2
intro to rsync
Disclaimer: this is meant only as a tutorial.
I got it running as a standalone daemon, electing to bypass the whole xinetd method. Running as a daemon: rsync --daemon --config /etc/rsyncd.conf. Stick that in like rc.local and it will start up on boot.
config file looks something like this (for now). you may have to play with ownerships/permissions to get everything to work for you.
Make sure the user you defined in UID has full permission to the path of the share(s) you set up in your config.Code:id file = /var/run/rsyncd.pid uid = nobody gid = users use chroot = yes read only = no hosts allow = * max connections = 0 [updates] path = /home/rsync/updates
Downloading from the share
I got the share called updates. In order to rsync from it and put it in a specific folder I'd run:
I was able to successfully download it all. Now if I run the command again, it does nothing because the files have not changed.Code:rsync -av mynew.server.com::updates /path/to/folder
Upload
Same principles apply, just reverse.
You may have permissions error that require some tweaking. Have fun.Code:rsync -vr /path/to/folder mynew.server.com::updates
NOTE: You should take your own measures to ensure nobody can get to your stuff either by using the Allow option in rsync, or use iptables to filter connections, or even setting up authentication in rsync.
- 02-03-2010 #3
Hi and welcome.
This should get you started:
- log into your "new" server via ssh
- install rsync, if it is not already there
- create a directory on a partition with enough space to hold the 132GByte
- log in to your "old" server via ssh
- become root ( or at least a user who has read rights to all your data files)
- install rsync, if it is not already there
- shutdown all services, especially DBs. This way, all your data becomes just static files.
- screen
- rsync -a --delete -e ssh <SOURCEDIR> <USER>@<NEWSERVER>:<DESTINATIONDIR>
- detach from screen with <Ctrl> + <a>, <d>
This will sync <SOURCEDIR> on the old server to <DESTINATIONDIR> on the new one over a secure ssh connection and utilizing rsync.
Some Notes:
- shutting down the services might need scheduling
- the sync takes ressources. CPU, IO, Net
- also consider the cost of transferring 136GByte. Two times actually. Old and new provider.You must always face the curtain with a bow.
- 02-03-2010 #4
scathefire was faster

Two approaches, both possible.
rsync over ssh takes more ressources, but you dont have to run a rsync server and also offers encryption.
The rsync server approach will be faster and offers some nice options in rsyncd.confYou must always face the curtain with a bow.


Reply With Quote