Quick question about rsync command


Aran

Recommended Posts

Hi, can any of you please confirm if i'm right about the difference between the next two commands?

 

1:   rsync -a -v /mnt/user/ISOs $MOUNTPOINT/ 2>&1

 

vs

 

2:   rsync -a -v --delete /mnt/user/ISOs $MOUNTPOINT/ 2>&1

 

The second one deletes files from the target that were deleted from the source, no? 

The first one is more like a real backup. Wich is what i'm trying to accomplish...

 

Thanks,

Aran.

Link to comment
On 5/4/2019 at 12:58 PM, Aran said:

2:   rsync -a -v --delete /mnt/user/ISOs $MOUNTPOINT/ 2>&1

 

The second one deletes files from the target that were deleted from the source, no? 

The first one is more like a real backup. Wich is what i'm trying to accomplish...

 

I came to ask exactly this... but I WANT to force a share to be a master that's already being rsynced. I've been deleting and retagging like mad, and I now want the backup to delete all old files I've already changed. I've been extremely careful, and the files are backed up to a 3rd location. I'm assuming I can modify my current unraid script to the above command with delete and 2>&1 ?  So I'm clear (and that's a big hurdle with scripts for me) - is the the comment 2>&1 defining which share is the master? thanks

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.