A little rsync help please


DWomack

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:

 

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

 

 

AABF42E4-64DD-4FCB-8F73-485A55DCE021_4_5005_c.jpeg

7C40886C-9278-422B-967F-7F81EA86D54F.png

Edited by DWomack
Clarify
Link to comment

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

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.

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