May 30, 20233 yr So I am moving files from Drobo Servers to Unraid. I wrote a script earlier that created a directory off of root and mounted an SMB share there. Then used rsync to copy files from that directory to the Share location in Unraid. It worked correctly, but was a little clumsy. Then trying to clean things up, I wrote this: sync_share(){ date echo echo Server IP: $1 echo Share Name:$2 echo echo Remote Share URL //$1/$2 echo Source /mnt/remotes/$1_$2 echo Destination /mnt/user0/$2/ echo /usr/local/sbin/rc.unassigned mount //$1/$2 # sleep 1 rm ./$2.rsync.log rsync -av --stats --log-file=./$2.rsync.log /mnt/remotes/$1_$2 /mnt/user0/$2/ # rsync -avn --stats --log-file=./$2.rsync.log /mnt/remotes/$1_$2 /mnt/user0/$2/ # sleep 1 /usr/local/sbin/rc.unassigned umount //$1/$2 sleep 1 date } dlandon told me about the /usr/local/sbin/rc.unassigned mount stuff. The source is the first picture and the second picture is the destination. The destination has picked up a folder with the ip addr and share name. See how it is doubled up? What am I doing wrong? Thanks Dennis Edited May 30, 20233 yr by DWomack Clarify
May 30, 20233 yr Author Tue May 30 09:27:24 EDT 2023 Tue May 30 09:27:24 EDT 2023 Server IP: 192.168.2.30 Share Name:Testing_1 Remote Share URL //192.168.2.30/Testing_1 Source /mnt/remotes/192.168.2.30_Testing_1 Destination /mnt/user0/Testing_1/ sending incremental file list 192.168.2.30_Testing_1/ Number of files: 32 (reg: 27, dir: 5) Number of created files: 0 Number of deleted files: 0 Number of regular files transferred: 0 Total file size: 4,019,868 bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 0 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 1,239 Total bytes received: 24 sent 1,239 bytes received 24 bytes 2,526.00 bytes/sec total size is 4,019,868 speedup is 3,182.79 Tue May 30 09:27:26 EDT 2023 Script has finished! Tue May 30 09:27:26 EDT 2023
June 1, 20233 yr Author On 5/29/2023 at 10:42 PM, DWomack said: rsync -av --stats --log-file=./$2.rsync.log /mnt/remotes/$1_$2 /mnt/user0/$2/ Should be: /mnt/remotes/$1_$2/ Needed the trailing slash
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.