- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: rsync permissions update every run.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use rsync to mirror my media library to my readyNAS 316 from my Mac mini. It's a 14TB library so examples below will only show a few lines.
I run the following:
rsync -aPvui --delete-during --delete-excluded --ignore-errors --exclude={'.Trashes*/','.fsev*/','.DS_*','.Spotlight*/','Automatically Add*/','Downloads*/'} /Volumes/Media\ Drive/ /Volumes/NAS2_Media_Server/Backup/Media --log-file=/Users/CXMS/Desktop/rsync_log2
I get no errors and so far it has done as expected with one exception; every run it indicates an update to the permissions of existing files. Nothing has changed on the original file.
Examples:
Run 1:
26350 files to consider
.d...p... ./
.f...p... .Media Preferences.plist
.d...p... Audiobooks/
.d...p... Audiobooks/Diana Gabaldon/
.f...p... Audiobooks/Diana Gabaldon/01 Outlander_ Outlander, Book 1 (Unabridged) Part 1.m4b
Run 2:
26350 files to consider
.d...p... ./
.f...p... .Media Preferences.plist
.d...p... Audiobooks/
.d...p... Audiobooks/Diana Gabaldon/
.f...p... Audiobooks/Diana Gabaldon/01 Outlander_ Outlander, Book 1 (Unabridged) Part 1.m4b
As you can see both runs are identical.
Any suggestions as to why it updates the permissions every run?
Thank you in advance for suggestions.
Radjin~
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@StephenB wrote:Try:
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ rsync://admin@10.0.1.20:/data/NAS1_Media_Server/Backup/media
rsync://admin@10.0.1.20:/NAS1_Media_Server/Backup/media
Changing to this seems to work:
I am going to let it run and move some date to see what happens.
Thank you.
All Replies
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
Are you running this on the Mac?
It looks like both source and destination are local - if so, the NAS volume is likely mapped and shared with SMB. If that's the case, Samba might be changing the permissions.
You could try enabling rsync on the NAS backup share and using admin@nas-ip-address:/Backup/media as the destination
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
Yes, this runs on a Mac and the NAS share is mapped as a local drive with SMB.
I can call rsync on the NAS directly with the IP address?
Would the syntax be:
user: password@IP_Address/Share
Or would I need to get a key from the NAS to avoid manually entering a password?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@Radjin wrote:
Yes, this runs on a Mac and the NAS share is mapped as a local drive with SMB.
I can call rsync on the NAS directly with the IP address?
Yes (though technically rsync on the Mac is connecting to the rsync server in the NAS).
@Radjin wrote:
Would the syntax be
user: password@IP_Address/Share
No (at least not on linux). Try the command first using the syntax I gave you, and see if it solves your problem. Note that you don't have to enable password protection on the destination share (look at the rsync network settings for the share). So you might not need to enter the password at all. Also, I think the default rsync access is read-only, so you do need to go the the rsync share settings and change that anyway.
If you do want to use password protection, you can use the --password-file option (if that exists on the Mac version).
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@StephenB wrote:
@Radjin wrote:Yes, this runs on a Mac and the NAS share is mapped as a local drive with SMB.
I can call rsync on the NAS directly with the IP address?
Yes (though technically rsync on the Mac is connecting to the rsync server in the NAS).
@Radjin wrote:Would the syntax be
user: password@IP_Address/Share
No (at least not on linux). Try the command first using the syntax I gave you, and see if it solves your problem. Note that you don't have to enable password protection on the destination share (look at the rsync network settings for the share). So you might not need to enter the password at all. Also, I think the default rsync access is read-only, so you do need to go the the rsync share settings and change that anyway.
If you do want to use password protection, you can use the --password-file option (if that exists on the Mac version).
I checked and rsync was on for the share. I had to enable ssh as well. It asked for my password because the share has one, I entered it and received the following:
rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@Radjin wrote:
I checked and rsync was on for the share. I had to enable ssh as well. It asked for my password because the share has one, I entered it and received the following:
rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12)
You don't need ssh for this - you just run rsync on the Mac with the change to the destination. Not sure what you mean by the "share has one". Are you saying that rsync is enabled as read/write for the share and it was already set up for password protection? Maybe post a screenshot of the network access tab for rsync (share settings)?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@StephenB wrote:
@Radjin wrote:I checked and rsync was on for the share. I had to enable ssh as well. It asked for my password because the share has one, I entered it and received the following:
rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12)
You don't need ssh for this - you just run rsync on the Mac with the change to the destination. Not sure what you mean by the "share has one". Are you saying that rsync is enabled as read/write for the share and it was already set up for password protection? Maybe post a screenshot of the network access tab for rsync (share settings)?
Attached is a screen shot.
The share is already password protected.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@Radjin wrote:
The share is already password protected.
Your screen shot says it's not. "Enable Password Protection" is not checked, and you haven't added any names/passwords to the password list.
What is the volume name?
What command line are you using?
Looking back, the destination path does need to include the volume name (/data if you are using XRAID).
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@StephenB wrote:
@Radjin wrote:The share is already password protected.
Your screen shot says it's not. "Enable Password Protection" is not checked, and you haven't added any names/passwords to the password list.
What is the volume name?
What command line are you using?
Looking back, the destination path does need to include the volume name (/data if you are using XRAID).
No, the rsync settings has no password, but the share itself is password protected. If that matters.
Oh, yeah, I forgot the data/ too. Let me try it...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
I tried it with:
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ admin@10.0.1.20:/data/NAS1_Media_Server/Backup/media
and
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ admin@10.0.1.20:/data/Backup/media
The difference is the Share name: NAS1_Media_Server
I still get:
ssh: connect to host 10.0.1.20 port 22: Connection refused rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
Try:
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ rsync://admin@10.0.1.20:/data/NAS1_Media_Server/Backup/media
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@StephenB wrote:Try:
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ rsync://admin@10.0.1.20:/data/NAS1_Media_Server/Backup/media
rsync://admin@10.0.1.20:/NAS1_Media_Server/Backup/media
Changing to this seems to work:
I am going to let it run and move some date to see what happens.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@Radjin wrote:
@StephenB wrote:Try:
rsync -aPvuin --delete-during --delete-excluded --ignore-errors --exclude={'*.Trashes*','*.fsev*','*.DS_*','*.Spotlight*','*Automatically Add*','*Downloads*'} /Volumes/Media\ Drive/ rsync://admin@10.0.1.20:/data/NAS1_Media_Server/Backup/mediarsync://admin@10.0.1.20:/NAS1_Media_Server/Backup/mediaChanging to this seems to work:
I am going to let it run and move some date to see what happens.
Thank you.
Using the above worked perfectly with the small change I made just below that. I'm amazed at the speed difference. I can only guess it's due to actually connecting to the rsync server rather having one machine scanning through a SMB connection.
Thanks for all your help.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
I'm glad I was able to help.
FWIW, the rsync: bit was needed because rsync defaults to running rsync-over-ssh when you have a remote source or destination. That ensures the network connection is encrypted/secure, but isn't necessary when you are running on a home network. Normally I use rsync backup jobs in the NAS to back up over the network, and had forgotten that.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
Have you ever accessed the terminal through ssh and ran rsync that way? Looking at posts here it looks like the GUI does not always use the most efficient options.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: rsync permissions update every run.
@Radjin wrote:
Have you ever accessed the terminal through ssh and ran rsync that way? Looking at posts here it looks like the GUI does not always use the most efficient options.
Not recently. I use rsync backup jobs to for my NAS to NAS backups. They run on a schedule, which is more convenient (and consistent) then running them manually.
My PC backup jobs use Acronis TrueImage (I use Windows, not MacOS). Desktops are scheduled (by Acronis); I do back up the laptops manually.
@Radjin wrote:
Looking at posts here it looks like the GUI does not always use the most efficient options.
What specific options you are thinking of?