Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

transferring files within the unraid server

Featured Replies

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

 

 

 

  • 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

 

 

 

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!  ;)

  • Author

[Good documentation dabl.  Could you update the wiki? -since I may need it at a later date!  ;)

 

Done!

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.

  • 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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.