November 22, 201510 yr I was thinking of using this command rsync --progress -avh /mnt/disk1/ /mnt/disk5/ Would it maintain the file date or create a new file with a new date on the target disk? I really want to preserve the file date, if at all possible.
November 22, 201510 yr You use –t to preserve modification time. -r is recursive (copy directories). Suggests this: rsync -avrth --progress //mnt/disk1/ //mnt/disk5/ I assume that you are using Disk shares only? If you are using User shares this is not a good solution. The script will also only copy data, files will still remain on disk1. Also test everything first with --dry-run so you know it’s working. Some reading: https://download.samba.org/pub/rsync/rsync.html
November 22, 201510 yr Author I believe I am using disk shares only. Not sure what user shares are. I only have kept a single user, root, on the server.
November 22, 201510 yr A User share can span several disks but a Disk share is assigned to a single disk (has nothing to do with user accounts).
November 22, 201510 yr Author Then I have plenty of user shares. Why would this be a problem? Basically I setup an unraid folder on each drive, and I place movies and tv series in two subfolders. Once each disk fills up, I move to the next one and maintain the same directory structure. I am planning to copy the data across, delete it so I can free up the drive, and then remove the drive and recalculate parity. I just tested it on a directory with just a couple of files and it did copy the data across, maintaining the same data that was in the other drive. So what issues will I encounter by using this command, with the shares I have?
November 22, 201510 yr With the setup you describe you should be fine. Some have their individual folders split over several disks so if you have a folder with several files (movie, subtitles, posters etc) they can actually be located on different disks.
November 22, 201510 yr Author Thanks for confirming. How do I make sure that all the file transferred ok before I delete the original? Also is there a command to delete the only directory on disk5, once the copying is done or shall I just use a windows machine to delete the directory? Thanks
November 23, 201510 yr You can use Windows to delete all folders and files and once your user share (the top level folder) is empty you can delete it in User Shares (unRAID GUI). rsync can be setup to verify files during copy and probably verify afterwards as well. Haven’t done it myself so try Google it.
November 23, 201510 yr Author Testing with: rsync -rvnc //mnt/disk5/ //mnt/disk9/ Let's see if it finds any file differences between disk 5 and disk 9
November 24, 201510 yr Author Result: root@Tower:~# rsync -rvnc //mnt/disk5/ //mnt/disk9/ sending incremental file list sent 59095 bytes received 296 bytes 5.12 bytes/sec total size is 462974754826 speedup is 7795368.91 (DRY RUN) I also tested with root@Tower:~# diff -rq //mnt/disk5/ //mnt/disk9/ it showed results "only in //mnt/disk9/... Deleting data from disk 5 now...
Archived
This topic is now archived and is closed to further replies.