Jump to content

A little rsync help please


Recommended Posts

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:


        echo Server IP: $1
        echo Share Name:$2
        echo Remote Share URL //$1/$2
        echo Source      /mnt/remotes/$1_$2
        echo Destination /mnt/user0/$2/
        /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


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?










Edited by DWomack
Link to comment

Tue May 30 09:27:24 EDT 2023
Tue May 30 09:27:24 EDT 2023

Server IP:
Share Name:Testing_1

Remote Share URL //
Source /mnt/remotes/
Destination /mnt/user0/Testing_1/

sending incremental file list

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

Link to comment

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...