• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

copy large folder between linux systems help!

ddoud

Limp Gawd
Joined
Sep 21, 2004
Messages
200
I've got to copy my home directory from my server to a new one I've set up and I'm wondering the best way to do this.

Everything I want to copy is in /home/myname/ and is about 25gb of storage. I've got them both behind the same 100mb router so I figure this is what I'll do, but I want to make sure the command is right and also, I'd like to know if theres a way to check that everything is copied OK.

I figure I'll run this: "scp -r 192.168.1.100:/home/myname ." from the new server in the directory I want. I might put the output in a file to check later.

Is there a better way? How about checking that everything copied OK?

Thanks!

-D
 
i'd say add a -p switch so that the copy preserves file attributes. After that you should be fine. If you want to confirm transfer (99.99999% it will be fine anyway) just take md5sums of a bunch of random files and compare them.
 
well, you could use rsync if you want it to break up into smaller pieces at a time automagically, but the gyst of it is the same. if you are going to continue using the old system, this is a good way to go since you could get the bulk of the copy done right now, and then quickly refresh (sync) it last thing before you shut the old system off.

one thing you might do is compress the directory before transfer and then uncompress it. however, since you're going over a local network, you might spend just as much (if not more) time on compression/decompression, depending on the speed of the systems.
 
It would be faster to compress the whole directory into one file, then copy that one file over. Copying lots of little files over will slow down any transfer, regardless of the operating system.
 
use rsync, this way you can confirm all the files after you copy them over. You can also use the --compress option to do on the fly compression and decompression as everything is transferred.
 
Try a command like this:
Code:
rsync -rLv --rsh="ssh -l REMOTEUSERNAME" . REMOTEUSERNAME@hostname:/destpath
I use little scripts sort of like this to sync local directories to remote servers efficiently. It makes updating a website or something similar much simpler; change the code locally and then sync. If you screw up, sync the other way.

 
Back
Top