Web Hosting Talk







View Full Version : rsync


Trix
08-18-2004, 11:40 AM
my friend has a a server at fdcservers and has bought a new server at servermatrix he has roughly 80-90gb on the old server (new one has 2x120GB hdd) and i was wondering how would i copy over all the files to the new server (RHE old: FEDORA)

so how would i copy all the files over without of messing up the system settings? both servers have cpanel if that helps :)

lostpacket
08-18-2004, 11:43 AM
backup and restore using CPANEL scripts ?

Trix
08-18-2004, 11:48 AM
well i was thinking doesnt that make a .tar.gz file ? THEN send it over to the new serer? (ftp) wouldnt that mean that i run out of space on the old server which has a 120GB hdd and 80-90GB of that used?

jhobbs1
08-18-2004, 11:51 AM
WHM / Transfers/ Copy multiple accounts from another server
worked well for me.

privHost
08-18-2004, 11:57 AM
Another alternative is to configure backup (on the old server) to use remote FTP to the new server. Once that is done, you can use the restore function to restore all or selected accounts on the new server.

By the way, if the old server has enough space for the backup of the biggest account, then you should be fine runing the transfer function. Transfer is done per account.

CybexHost
08-18-2004, 01:09 PM
The Transfer option should work fine for you as discussed. And like privHost said, it's per account so any failures would require just rolling back one account. You can monitor each account transfer as well so this is certainly ideal.

I'd do this type of transfer at off hours because packaging that much data, even though it's spread out over many sites, would use a great deal of resources on both servers.

Trix
08-18-2004, 02:44 PM
well its more or less his own private server an the 1 account is 80-90 GB >.< and the server doesnt have enough space to back that file up

so should i just do:
WHM / Transfers/ Copy multiple accounts from another server
?

privHost
08-18-2004, 03:07 PM
If that is the case, then transfer will probably fail -- it depends on how good the account can be compressed. You can try it if you have the time. Best bet in this case would to use the remote FTP backup option.

Of course, you can also manually copy the home directory first. Then delete enough of it (maybe all?) to free up disk space, so that a normal account transfer will work.

Trix
08-18-2004, 03:47 PM
well there all .avi (anime) files so compression isnt likly :P

ive done WHM / Transfers/ Copy multiple accounts from another server and so far everythign seems good :)

sorry if i sound so n00by is because im a n00b to this sorta thing :P

i would recomend http://www.webhostgear.com to people like me (b00bs :D) someof the security tutorials are very good! :)

Trix

Trix
08-18-2004, 04:17 PM
nope WHM / Transfers/ Copy multiple accounts didnt work because it makes loads of tar.gz files and well that filled up that hdd on the old server and it stopped working.. any other idea? (n00b friendly :D) the old server dies in 2 days so if you can help quickly it would be appreciated!

privHost
08-18-2004, 05:03 PM
If you want to most simple solution, I would suggest the following method
you can also manually copy the home directory first. Then delete enough of it (maybe all?) to free up disk space, so that a normal account transfer will work.
You can ftp the AVI files over to the new server first. Then delete them from the old server. Once the total disk usage is low enough, you can try the account transfer again. Make sure to save the AVI files in a different location (not in the home directory). You can move them back later.

luki
08-19-2004, 02:07 AM
The subject of this thread is rsync, yet no one discussed it here?

Just use rsync to move the data. No need for temporary files and worrying about running out of disk space. Just set up an rsync server on the new server, and connect to it with rsync on the old server. Works just fine. Google is your friend for HOWTOs.

piramida
08-19-2004, 03:32 AM
absolutely no need to setup a server for one-time use. just type rsync -avz user@old.server:/home/ /home while being on the new server, that'll transfer your homes where you have your avi's. you can transfer the rest (cpanel configs) using WHM.

Website Rob
08-19-2004, 07:20 AM
If you have 'backup' enabled on the old Server, you can gain more space by deleting the backup directorys for weekly & monthly.

cd /backup/cpbackup/
rm -rf monthly weekly


I would also suggest you stick with using WHM to transfer. That way you'll get everything you need. Doing transfers piecemeal is a PITA. ;)

Trix
08-19-2004, 09:37 AM
well thanks for all your help and yes rsync was the title for a reason but i totaly forgot :P well wgetted all of the major AVI's and now have enough room to backup via whm but im still going to try

rsync -avz user@old.server:/home/ /home

but how would i format that?

rsync -avz root:password@old.server.ip:/home/ /home ?

privHost
08-19-2004, 09:58 AM
To use rsync, you will need to have rsyncd (the rsync demon) setup and running on either one of the servers. Then you can run the rsync command on the other server. If rsyncd is runing on the oldserver:

rsync -avH rsync://rsync-user@old.server/rsync-module/path/to/file /destination/path

where rsync-user is the user name defined by rsync (not your regular users) and rsync-module is where you setup the base directory for rsync. This can be / or any other directory. This is the simple case, it will prompt you for the password. There are many other options. See "man rsyncd.conf" for more complete info.

So unless you already have it setup and config'ed properly, it is more involved at first than you would expect. The transfer method in WHT and wget/ftp are much simpler. You may want to learn about it any case for future use.

racksense
08-19-2004, 11:23 AM
You don't *have* to use rsyncd, you can use rsync over rsh/ssh providing you have the rsync executable and a shell account on each system. For this particular situation probably a root shell so that you can read all the files on source, and set the permissions on target.

privHost
08-19-2004, 11:58 AM
Technically this is correct. But we are talking about different ways of achieving the same thing, using different environment setup. In any case, if we do have rsh or ssh available, would it be simpler to just run scp?

The goal is a one-time transfer ~90 GB of data from one server to another. So unless there is a desire to learn more about rsync, perhaps a simple ftp or wget (if it is network visible) would be sufficient to overcome the problem of insufficient backup space on the old server. The rest of the account stuffs can then be transfered using the Cpanel tool.