Smartest way to copy the old data over as bgr process?

Status
Not open for further replies.
B

Bohs Hansen

Guest
Hi

Scenario: Got an old NAS with my data on and my new FreeNAS 8 amd iso box. I want to copy all the data from the old NAS shares to the new, but I don't want to have a computer running to manage it.

So I was wondering, if there was an easy way to start a background process on FreeNAS via direct console to get the files via FTP or CIFS?

Any input is appreciated, from solutions to pointers in the right direction
 

icemouse

Cadet
Joined
Jun 1, 2011
Messages
6
If the old box has SSH running I would just use SCP..

scp -r root@oldbox:/Data /oldserverdata

copies /Data on the old server to /oldserverdata on the new server if you run it from your new boss

Or you can push the data to FreeNAS from the old box if you flip the order of the arguments
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
scp may encrypt your files when moving them across the network; this may not be efficient. Turning off scp encryption has its own drawbacks too.

Us old-timers who predate ssh often have utilities like netcat (or our local equivalents, rget/rsend) laying around, and we will move data around with, for example, tar:

newserver# cd /mnt/data; rget 2000 | tar -xvf

oldserver# cd /mnt/data; tar -cvf - . | rsend newserver 2000

And the network connection proceeds to melt to slag. To make something like that happen on FreeNAS, though, you have to borrow a tool to do it. You can probably just snag the netcat package off of freebsd.org, but I can't actually try this easily since our storage servers have no net access:

% fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/packages/All/nc-1.0.1_1.tbz
% tar xf nc-1.0.1_1.tbz

on both machines, maybe in /tmp, and then go from there to use nc with tar. It can be more work than scp but it may also be a lot faster in some cases.
 

esamett

Patron
Joined
May 28, 2011
Messages
345
i am doing it the slow way. from my commercial nas to my freenas with my windows pc running the cifs transfer. slow and easy...
 
Joined
May 27, 2011
Messages
566
So I was wondering, if there was an easy way to start a background process on FreeNAS via direct console to get the files via FTP or CIFS?

Any input is appreciated, from solutions to pointers in the right direction

if you plug a monitor and keyboard into your FreeNAS box, i think pressing 6 will take you to the console, maybe it's 7, it will say on the screen. once logged in you can transfer the files using ftp. if you have an SSH server on your old nas box, you can use rsync (instead of scp).

Rsync is preferable to scp as it can resume transfers.

rsync --stats --progress -r -avz -e ssh User@OLDNAS:/location/of/files/ /Destination/of/files

this will recursively copy all the files from /location/of/files/ on your old box to /Destination/of/files of the new box.

we tell rsync to connect via SSH so we don't have to worry about setting up an rsync server on the old nas. i get transfer speeds of 40-50 MB/s using rsync and ssh from my Server (Solaris) to my File Server(FreeNAS).
 
B

Bohs Hansen

Guest
thanks a lot for the feedback, I knew there had to be such a simple way. I have to admit I grew up as a DOS kid, but I know my basic way around a *nix system by now. But still got lots of commands to learn and add to my vocabulary :)

At the moment I still got an old CRT and PS2 keyboard attached to the server at all time, for the console... hehe, often easier to do things right on the target itself.

rsync is a great idea, didn't know up till now that it could work over ssh that simple without having rsync on the other device. My old QNAP doesn't support it, but SSH is never a problem. :)
 

rjgould

Dabbler
Joined
May 28, 2011
Messages
32
I was far too lazy to do any of that. I ssh'd into the freenas box, mounted the old server share and just issued a mv command into the background. Worked perfectly.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I was far too lazy to do any of that. I ssh'd into the freenas box, mounted the old server share and just issued a mv command into the background. Worked perfectly.

No need to be ashamed about lazy, as long as it works. There are so many combinations of things that might be possible that it's rarely hard to find an easier way to do something.
 
Status
Not open for further replies.
Top