November 16, 201015 yr I've read this wiki entry http://www.lime-technology.com/wiki/index.php?title=Transferring_Files_Within_the_unRAID_Server I want to copy the contents of 3 disks in my unraid server to a single larger disk (ex disk1,disk2,disk3 -> disk7) I'll be replacing the 3 smaller disks with the larger single disk. The root directory structure on disk1,disk2,disk3 is: movies music video misc Assuming I've created no root folders on disk7, will executing the below from the command line in a .sh file work or should I first create the identical root folder structure on disk7? Either way is fine, I just want a procedure and script that will work. After the copy I plan to remove disk1,disk2,disk3. thanks for any comments, === cp -r -v /mnt/disk1 /mnt/disk7 cp -r -v /mnt/disk2 /mnt/disk7 cp -r -v /mnt/disk3 /mnt/disk7
November 18, 201015 yr Author For the next poor bastard who asks the same question and gets no answers. I found the aforementioned 'transferring files within the unraid server' wiki article to be less than completely helpful as it omitted a few important details. Following the unix commands section 'cp -r /mnt/disk4 /mnt/disk8' example syntax one gets a root dir on disk8 named disk4 with the contents of disk4 underneath it. Definitely not what I wanted. Appending '/*' to the end of the cp section fixes this. ex 'cp -r /mnt/disk4/* /mnt/disk8' I think most people would also want the date and time of the original files preserved. I know I did. This is accomplished by including the '-p' flag. The -p flag is aluded to (sort of) in the 'Copy files from a NTFS drive' wiki article. http://lime-technology.com/wiki/index.php?title=Copy_files_from_a_NTFS_drive I find it odd and annoying the -p flag wouldn't be the default for the cp command. In what fucked up default universe would someone not want their copied files to have the original date/time stamps? I suppose there must be a compelling reason for this outside of the smb world.... Lastly I found it useful to log the output of the copy in case there were problems. This is accomplished by including the -v flag (for verbose mode) and piping the output to a file. I also found it useful to run the output through 'todos' to convert it to be readable by something like windows notepad. My final script looked like the below. === cp -r -v -p /mnt/disk1/* /mnt/disk7 | todos > /boot/disk1copy.txt cp -r -v -p /mnt/disk2/* /mnt/disk7 | todos > /boot/disk2copy.txt cp -r -v -p /mnt/disk3/* /mnt/disk7 | todos > /boot/disk3copy.txt
November 18, 201015 yr For the next poor bastard who asks the same question and gets no answers. cp -r -v -p /mnt/disk1/* /mnt/disk7 | todos > /boot/disk1copy.txt cp -r -v -p /mnt/disk2/* /mnt/disk7 | todos > /boot/disk2copy.txt cp -r -v -p /mnt/disk4/* /mnt/disk7 | todos > /boot/disk3copy.txt Good documentation dabl. Could you update the wiki? -since I may need it at a later date!
November 18, 201015 yr Author [Good documentation dabl. Could you update the wiki? -since I may need it at a later date! Done!
November 18, 201015 yr I used MC on my unRAID server to move files from one drive to another. I just used the console and typed MC and changed the left and right panes to look at the correct location and then (F6 - I think) to move the files.
November 18, 201015 yr Author I used MC on my unRAID server to move files from one drive to another. I just used the console and typed MC and changed the left and right panes to look at the correct location and then (F6 - I think) to move the files. Yep, it's a good option if you want to do a copy/move interactively. I had three drives totaling ~1.2 TB of data with multiple folders to copy so I wanted a script.
Archived
This topic is now archived and is closed to further replies.