I have bought the WDMC lately and I have an old DLINK DNS-321 as a previous NAS. There is more than 1TB of data in the DNS321 and I wanted to import all that into the WDMC, wipe it out of the DNS-321 and make that device the backup storage place for WDCM Safepoints.
But how to transfer 1TB from a NAS to the WDMC ?
Both NAS are set as FTP server and both are connected to the same router. But if I use my Pc (file manager or other tools) to copy/paste folder from the DNS-321 to the WDMC it is awfully slow because the data transits trough the PC ; upload from first NAS and download into the other simultaneously…
The better way is to SSH into the WDMC and import the data directly from there. But there is no ftp client in the WDMC hence no way to ftp to the DNS-321 and get the data. Perhaps the WDMC could be an SFTP client but my DNS-321 does not handle the secure shell…
Then I found this older post about the same question on a My Book Live : http://community.wd.com/t5/My-Book-Live/How-to-use-ftp-client-on-Mybook-live/td-p/250834. It suggests the command “wget” to do the job. That command is great for this, indeed. The only thing missing in that post is how to list the content of the remote server, so you know the path to the data. I found how to do that somewhere else.
I now have a very simple and effective way of copying tons of data into the WDMC from another server:
Prerequisites:
- Enable SSH on the WDMC (WDMC interface -> Parameters, Network -> Services SSH (it will show the password as you turn it on))
- activate FTP server on the other NAS
- Have a user with read right to all folders in the other NAS
Procedure:
(let’s say that the WDMC IP address is 192.168.1.101 and the DNS-321 is 192.168.1.102)
- SSH connect to the WDMC (easy with MAC, requires Cygwin with a Pc … does anybody have an alternative ?)
- List the content of the other server :
curl -L ftp://<remote_user>:<remote_password>@192.168.1.102
Example :
WDMyCloud:~# curl -L ftp://..:..@192.168.1.102/
drwxrwxrwx 5 501 501 4096 Dec 31 17:03 Aimie
drwxrwxrwx 7 501 501 4096 Jul 12 2012 Invite
drwxrwxrwx 3 501 501 4096 Aug 30 2013 Nathalie
drwxrwxrwx 5 501 501 4096 Feb 25 22:45 Réjean
drwxrwxrwx 3 501 501 4096 Jun 19 2013 Réjean_20120306
drwxrwxrwx 3 501 501 4096 Sep 16 2012 WindowsImageBackup
-rwxrwxrwx 1 501 501 68 Jun 20 2010 desktop.ini
WDMyCloud:~#
WDMyCloud:~#
- Let’s say I want to import all files under other server’s /Nathalie into her My Cloud folder :
cd /shares/Nathalie
wget -m -nv ftp://<remote_user>:<remote_password>@192.168.1.102/Nathalie
Note : -m is for mirror, -nv is for non-verbose
Example :
WDMyCloud:/shares/Nathalie# wget -m -nv ftp://<remote_user>:<remote_password>@192.168.1.102/Nathalie
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie [663] -> “192.168.1.102/.listing” [1]
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Nathalie [185] -> “192.168.1.102/Nathalie/.listing” [1]
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/Nathalie [5353] -> “192.168.1.102/Nathalie/Pictures/.listing” [1]
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2010-06-07/Nathalie [282] -> “192.168.1.102/Nathalie/Pictures/2010-06-07/.listing” [1]
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/Nathalie [27699] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/.listing” [1]
2014-02-28 23:24:04 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0032.JPG [2945677] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0032.JPG” [1]
2014-02-28 23:24:05 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0033.JPG [4243952] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0033.JPG” [1]
2014-02-28 23:24:05 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0034.JPG [3645003] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0034.JPG” [1]
2014-02-28 23:24:05 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0035.JPG [3668067] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0035.JPG” [1]
2014-02-28 23:24:06 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0036.JPG [3671609] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0036.JPG” [1]
2014-02-28 23:24:06 URL: ftp://rejean:*password*@192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0037.JPG [3549615] -> “192.168.1.102/Nathalie/Pictures/2011-04-01/DSC_0037.JPG”
…
- The complete path of the imported data is replicated in the WDMC local folder hence the full path of the data is now “/shares/Nathalie/192.168.1.102/Nathalie/…”. To fix that, do something like the following :
cd /shares/Nathalie # be sure to be in the correct folder
mv 192.168.1.102/Nathalie/* . # move all data to current folder
rm -rf 192.168.1.102 # remove old path and everything under
.
Voilà !
I get 10MB/s transfer rate like this which is good considering that the DNS-321 only has a 10/100 network port.