December 1, 20232 yr Hi everyone, I just finished setting up my new Unraid server, but I'm having a hard time finding a good step by step tutorial on the easiest and fastest way to migrate around 10TB of data from the FreeNAS server to the new Unraid server. When I use Windows Explorer, naturally this is a painfully slow way to move data at around 25MB/s. Both boxes are connected to the same switch using 1Gb copper. The Windows tower is wireless only unfortunately. Can someone provide a link to some good tutorials on how to get this done faster? I'm running Unraid Version: 6.12.5 and the older server is running FreeNAS-11.2-U2.1.
December 1, 20232 yr Community Expert Solution I used rsync and the Unassigned Devices plugin. Basically, you mount the FreeNAS server using the Unassigned Devices plugin. Then use rysnc from the Command line in the GUI terminal. My rsync command looked like this: rsync -avhPX /mnt/remotes/192.168.1.245_Media/All\ Movies/ /mnt/user/BackupMedia/All\ Movies/ Now, before you use rsync, googling it finding lots and lots of pages that will explain how to use it. There are some gotchas in its use but any good online tutorial will help you avoid them. The switches that I use (and in the command line above) are not the only ones that you can use and they will do the same job. (Mine is set up so that it gives lots of information as it does its job. A different combination of switches would run it silently and you will not know what is happening until the command prompt returns after it has finished. Probably a bad idea as copying 10TB of data will take several days!) Rsync was written in 1995, in the public domain, and has been ported to virtually every OS in existence. (As I seem to recall, it does have to be available on both the source and destination devices. But FreeNAS will either have it installed or it should be available for installation.) One more thing. Go to Settings >>> Disk Settings and set the following variable in the Disk Setting section/tab as shown: The setting will double the write speed to the Unraid array. (If you have a cache drive for the Unraid, disable it for that share until the initial data from the other server is complete.) Edited December 11, 20232 yr by Frank1940
December 1, 20232 yr Community Expert One more thing, when installing Unassigned Devices, also install The other Unassigned Devices plugins--- Addon and Preclear. One of them installs tmux which allows you to terminate the terminal GUI without causing rsync to crash. Otherwise, you have to use the console (keyboard and monitor connected to your Unraid server. Again Google tmux for instruction on how to use it. (It is not complicated but also not obvious to the casual observer...) Rsync is very powerful tool. That same command line in the previous post will also update my backup computer with all of the new added files to the other server. (It will only copy the new and changed files.)
December 4, 20232 yr Author Hey Frank, just wanted to say thanks for the helpful tips. I did have to setup the Rsync Module in FreenNAS, but it was pretty straightforward. Mounted the FreeNAS server in Unraid as you mentioned and started the copy using tmux. I also changed my disk setting as you recommended and my primary storage from the cache drives to the array as I'm assuming that's the way to "disable" them for the time being. Not quite gigabit speeds as I'm only hitting around 75MB/s, but still not too bad considering I was only getting 25-50MB/s before and it's definitely better than relying on Windows Explorer between servers.
December 26, 20232 yr Was wondering @Frank1940 what your experience has been with permissions? My experience so far with copying data from TrueNAS Scale to unraid is that no matter what options I give it when copying data from truenas scale -> unraid, once I rsync the data back, the permissions get stripped away. Been doing some rsync tests to sync between truenas scale and unraid (which is my backup server) So on truenas I created folder with a test file with these permissions (The kodi user I added through Windows explorer): On unraid I created the same users as truenas with the same UID rsyncing from unraid using the unraid smb mount to the truenas server does not replicate any of the permissions.(using /usr/remotes) When replicating it from truenas to unraid using ssh with this command: rsync -avh /mnt/pool02/ds02/vmbackup/test-data root@unraid:/mnt/user/backup01/ The directory security on the unraid target looks like this after rsync sends it to unraid: Then proceeded to deleting the folder at the Truenas source after which I tried to replicate it back from UNRAID: Tried several variants like this one but it does not work: (when logged into the truenas server) rsync -a [email protected]:/mnt/user/backup01/test-document.txt /mnt/pool02/ds02/vmbackup/ rsync: [receiver] mkstemp "/mnt/pool02/ds02/vmbackup/.test-document.txt.SHIxK3" failed: Operation not permitted (1) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [generator=3.2.7] rsync --partial --stats --progress –A –rltgov --no-perms [email protected]:/mnt/user/backup01/test-document.txt /mnt/pool02/ds02/vmbackup/ Unexpected remote arg: [email protected]:/mnt/user/backup01/test-document.txt rsync error: syntax or usage error (code 1) at main.c(1512) [sender=3.2.7] After many attempts this commands copies the data back from unraid(when logged into unraid) to truenas but the permissions are stripped: rsync –a -r –v -t /mnt/user/backup01/test-data root@truenas:/mnt/pool02/ds02/vmbackup I've almost given up on getting the permissions right when copying data from truenas <--> unraid and back Any success stories on how to do this properly are most welcome! Edited December 26, 20232 yr by ___niko___ fixed typos and added an additional picture
December 26, 20232 yr Community Expert You are trying to set permissions using Windows security on a Linux file system. If you are not running AD (Active Directory), this is probably a mistake. You can basically set the permissions required using the 'Public', Secure' or 'Private' settings on the Unraid GUI. (In fact,, it seems that it is possible to screw thing up on the Unraid side by doing this...) There is a section on this forum for Active Directory: https://forums.unraid.net/forum/102-active-directory/ You might want to ask your question there. There is a set of instructions (PDF) for how to set things up for Windows-Unraid security. You can find it here: https://forums.unraid.net/topic/110580-security-is-not-a-dirty-word-unraid-windows-10-smb-setup/ IF you find that you have the problem described here: https://forums.unraid.net/topic/116389-access-denied-printer-unraid-share/#comment-1058963 You can restore things by running the 'New Permissions' Tool in the Tools menu of the GUI on the affected share(s). I really try to avoid using Windows security settings as I find them very confusing. (I do setup some Windows Peer-to-Peer file sharing to totally trusted users so I have a few restrictions on those shared Windows-to-Windows shares.) Edited December 27, 20232 yr by Frank1940
December 26, 20232 yr confusing for sure 😀 (not using AD, trying to rid my world of as much Windows as possible) Other (older) tutorials used to mention setting permissions from Windows and don't mess it from bsd/linux. (NappIT for example) Before using rsync and unraid I've been moving data around using ZFS snapshots between TrueNAS instances and then things work flawlessly. The permissions are a pain but not enough to stop me from using rsync. Thank you for your quick reply! 🙇♂️ @Frank1940 Edited December 26, 20232 yr by ___niko___
December 27, 20232 yr Community Expert With Unraid if you go to Shares, then click on the 'User Share' that you want to set up permissions on, you will find these sections/ tabs on that GUI page: (I have turned the 'Help' so you can see that basically, you can set up permissions for each 'Share Access' user. (Windows does provide a lot more options but Unraid's choices will suffice for most folks.)
December 27, 20232 yr Community Expert 21 hours ago, Frank1940 said: (I do setup some Windows Peer-to-Peer file sharing to totally trusted users so I have a few restrictions on those shared Windows-to-Windows shares.) One thing I did not explain is that these permissions are setup (using the Windows Security settings) on the Windows computer where the resource is stored. (In the peer-to-peer file sharing mode, any Windows computer can be a server, a client, or both a client and server.) I am not a Windows SMB Guru. (That takes considerable formal training to even get started and years of actual experience to become a Guru.) Windows file sharing is divided into two separate areas--- peer-to-peer and AD. Peer- to-peer is used by home users and some very small businesses. AD is used by the Business and Corporate world. Guess which one is treated by MS as the ugly step-child...
December 27, 20232 yr 21 hours ago, Frank1940 said: With Unraid if you go to Shares, then click on the 'User Share' that you want to set up permissions on, you will find these sections/ tabs on that GUI page: (I have turned the 'Help' so you can see that basically, you can set up permissions for each 'Share Access' user. (Windows does provide a lot more options but Unraid's choices will suffice for most folks.) Brilliant post much appreciated @Frank1940! I'm going to use unraid sharing when I configure a share for my proxmox VM backup. For the truenas -> unraid rsync tasks, unraid is just being used as an target for different truenas servers, would have been nice if all permissions would replicate back and forth but it seems to be a PITA. No matter, I know which permissions go where in case of emergency having the data + timestamps (for family-photos as example) is most important)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.