D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-320L => Topic started by: andsoitgoes on July 06, 2016, 02:19:11 PM

Title: SOLVED! Need to move large number of files, can I have a script in the BG?
Post by: andsoitgoes on July 06, 2016, 02:19:11 PM
Hi everyone,

So as per usual I misjudged my storage needs and ran out of space on the main drive - I intended to move things over regularly but didn't.

ANYWAY - Here I am now trying to move stuff over through Windows. What that means is an insanely arduous copy and paste.

I'm working on 1.07 and doing a factory reset to get full SSH access.

Once I have that, is there an easy script I can run to move files from one HD to the other storage drive without having to stay connected?

Thanks very mucn in advance everyone!
Title: Re: Need to move large number of files, can I have a script running in the BG?
Post by: ivan on July 06, 2016, 03:36:40 PM
Am I correct in assuming that you want to copy files from one disk on your NAS to the other one?  Assuming you have it setup as two single drives then read the section of the manual about 'Local Backups' which allows for just that.

If, on the other hand, you want to copy some files from your computer to the NAS then you can either use the 'Remote Backup' available on the NAS or the easy way is to use FTP.

With FTP, activate the server on the NAS and then use a batch file to start an FTP Client on the computer and feed it a list of what to send to the NAS - you can even use the batch file to delete the files after they have been sent and verified.
Title: Re: Need to move large number of files, can I have a script running in the BG?
Post by: andsoitgoes on July 06, 2016, 04:03:14 PM
Actually - I think I sorted it on my own. I wasn't using the "./move.sh" script with the proper command.

Went and performed the following:

./move.sh &

with the move script containing the following command:

mv * /mnt/HD/HD_b2/media/downloads/

So far it's done quite well moving between the drives, but then I realized I won't be able to easily control it - Local Backups looks to do the same thing, so I'm all on board with that, and I've switched over (after struggling to kill the bloody script I was running!)

Thankfully I've got over 2TB free on the drive I'm moving to, so I'll worry about the extraneous stuff later!

Thanks so much for the Local Backups suggestion, ivan! That's really helped a ton, should have looked there first! This is SO bloody fast in comparison to the windows copy, and looks equivalent to my mv command.

Did I mention you rock? Because you rock.
Title: Re: SOLVED! Need to move large number of files, can I have a script in the BG?
Post by: ivan on July 07, 2016, 04:22:55 AM
Happy to have been a help.