WD Hard Drive Moving files internally thru SSH

So I have about 550GB on a WD My Book Live NAS and I realized I put it on the public folder.  Well that\’s not very secure so I moved it.  Typical me understanding that it will take it forever to copy from the drive, to my computer, back to the drive was wondering if there is a way to quickly copy files from one part of the NAS to another without it being much time consuming.  So did some searching (not sure how long it will be available) so I am posting it here for myself in the case I need to turn ssh back on and move files.

~Disclaimer~ If you use this info and it messes up your mybook live NAS…use it at your own risk, no warranty implied or implicit, you break it with this info sucks to be you.  By reading the instructions below you agree to indemnify myself and others from legal action.

Techie disclaimer – it worked for me 🙂 Oh and after I turned on SSH and moved the files… I turned SSH off.

Instructions –

Moving files between shares

Are there any implications of moving files this way?  I\’m quite picky about preserving all the file metadata / datestamps etc as I migrate over time from one device to another.  In particular, I want to preserve file creation and modification timestamps, because they hold valuable information in my view that mustn\’t be lost in moving from one drive to another, or one folder to another.

Also, moving files in this way \”by stealth\” won\’t confuse the drive controller\’s view of what is stored, where?  For example, even just using \”mkdir\” to creat a new share won\’t mean that that new share isn\’t visible to the drive\’s web interface setup facility?

 

(1) Go to http://yourIP/UI/ssh where yourIP is the IP address of the MyBook.

(2) Login as root, password welc0me (that\’s a zero in there).

(3) cd /DataVolume/shares (change dir to where your shares are).

(4) ls (list your shares).

(5) mkdir ShareB (make a new folder for the new share).

(6) mv ShareA/* ShareB/ (move everything in ShareA into ShareB).

if I am moving files/folders from ShareA into \”ShareB\\subfolder\” (i.e. a subfolder within new ShareA, not at the top level), will the above method work, just using mkdir in step (5) to create the subfolder, and putting in the full path to the new subfolder in step (6).  In other words:

 

(5*) mkdir ShareB (make a new folder for the new share).

(6*) cd ShareB

(7*) mkdir subfolder

(8*) cd /DataVolume/shares

(9*) mv ShareA/* ShareB/subfolder

 

Trackback to original post –

http://community.wdc.com/t5/My-Book-Live/Moving-files-between-shares/m-p/252500/highlight/true#M4035

http://community.wdc.com/t5/My-Book-Live/Fast-copy-between-shares/m-p/161650

 

 

 

 

Leave a Response

You must be logged in to post a comment.