You are not logged in.

#1 2009-09-23 17:01:42

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Best Way To Move Data

I am getting ready to tear down a server and I need to pull a directory off  the server which has massive data on it. The directory is /data on "server_old" I would like to move that data as fast as possible to "server_new" but am not sure the best way to do so. Should I scp the data over SSH? Do I do some kind of Rsync command with compression switch enabled so the data is compressed and then sent over ssh to the "server_new"?

Any advice is greatly appreciated!

[root@server_old ~]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sdb1     ext3    396G  364G   12G  97% /data

PS - Both servers are hooked up to a 1000MB switch and have Gigabit NIC's installed.


./

Offline

#2 2009-09-23 17:40:45

zen3
Member
From: Greece
Registered: 2009-09-02
Posts: 30

Re: Best Way To Move Data

rsync ?


ffc

Offline

#3 2009-09-23 17:40:52

tkdfighter
Member
From: Switzerland
Registered: 2009-01-28
Posts: 126

Re: Best Way To Move Data

No, definitly don't use SCP, SFTP or rsync, which also uses SSH. SSH encrypts everything, which is very slow even on fast processors and beneficial only when moving stuff over an untrusted network. It would probably be fastest to use NFS or FTP to copy the data to your new server.

Offline

#4 2009-09-23 18:11:26

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Best Way To Move Data

forklift


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2009-09-23 18:32:22

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Best Way To Move Data

OK - I see this thread is going nowhere...


./

Offline

#6 2009-09-23 21:48:47

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Best Way To Move Data

If it's possible, just put your new hard drive inside of your old server and rsync your data with the "-ax" options to the new partition.

rsync -ax /olddir /newdir

-a -> archive mode, that means "preserve owner, group, user rights, symlinks, etc."
-x -> do not sync other filesystems mounted inside the one your copying (e.g. if you have mounted a partition in the /olddir directory, that partition is not copied)


In love I believe and in Linux I trust

Offline

#7 2009-09-23 22:43:40

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Best Way To Move Data

ckristi wrote:

If it's possible, just put your new hard drive inside of your old server and rsync your data with the "-ax" options to the new partition.

rsync -ax /olddir /newdir

-a -> archive mode, that means "preserve owner, group, user rights, symlinks, etc."
-x -> do not sync other filesystems mounted inside the one your copying (e.g. if you have mounted a partition in the /olddir directory, that partition is not copied)

That's probably your best option, or if you can't physical move the drives, just setup rsync on 'old_server' to listen for incoming connections. This doesn't use encryption so will be faster than tunnelling it over SSH.

Offline

#8 2009-09-24 12:34:48

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Best Way To Move Data

So it looks like Rsync is the best bet with the exception that it uses encryption over SSH.  I have never used NFS but I know that would require my configuring the NFS server daemon on the server under /etc/exports file and then having to download and install a NFS client on the new server so it can connect to the NFS server.


./

Offline

#9 2009-09-24 13:43:13

zukka
Member
From: Bologna Italy
Registered: 2006-06-27
Posts: 26

Re: Best Way To Move Data

I've been told that ssh encryption is much faster using blowfish algorithm, so if you can't move the disk you could try with

rsync -e "ssh -c blowfish" -ax --numeric-ids /olddir user@newserver:/newdir

Last edited by zukka (2009-09-24 13:43:37)

Offline

#10 2009-09-24 13:46:46

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: Best Way To Move Data

Thanks! I will give the above listed a shot!


./

Offline

#11 2009-09-24 14:10:19

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Best Way To Move Data

NFS is not the best option because if the connection is broken you cannot be sure where you left off. rsync can be used over rsh which does no encryption (rsync -e rsh). Of course, you need rshd running, which can be started through xinetd or manually.

Offline

#12 2009-09-24 14:31:11

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Best Way To Move Data

netcat is probably fastest. If you want to compress/encrypt as well it's up to you. I used the example in the link to copy over my localnet.

Last edited by vacant (2009-09-24 14:31:52)

Offline

#13 2009-09-27 22:01:07

lordmetroid
Member
Registered: 2009-09-27
Posts: 75

Re: Best Way To Move Data

how about git?

Offline

#14 2009-09-27 22:43:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Best Way To Move Data

If the OP was trying to sync the 2 machines, and keep them in sync over time then git might be suitable, but for a one-time transfer from A or B, seems a bit of overkill given the other solutions available...

Offline

#15 2009-09-27 23:59:27

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Best Way To Move Data

I would use rsync for this. rsync only uses ssh if you tell it to. If both machines are on your local network you don't really need to encrypt the transfer as you would if sending the stream through the internet. Setup a rsync server on the old machine and use the rsync protocol instead of ssh.

Offline

Board footer

Powered by FluxBB