rsync time machine backup permissions

Joe josephj at main.nc.us
Tue Mar 20 03:39:17 UTC 2018


I'm not sure if this might be an issue here. Since your variable isn't 
quoted, it might not be. But:

When you run rsync as rsync $param1 ...

and param1 is null, it may still be treated as the first argument to 
rsync - which may add the current directory to your sources or throw 
things off in some other way.

It depends on if it gets eliminated by the shell before rsync sees it.

Since this is relatively invisible, it's pretty hard to notice.

See 
https://unix.stackexchange.com/questions/415990/how-can-i-expand-a-quoted-variable-to-nothing-if-its-empty/ 


for a detailed exploration of this problem and ways to avoid it.

Joe

On 03/19/2018 06:22 AM, Andre Althoff via rsync wrote:
> Dear rsync users,
>
> I'm trying to copy my Time Machine Backup from my old USB hard drive 
> to a new one. I got error messages, because rsync don't create group 
> and other permissions.
>
> I use rsync 3.1.3.
>
> Did I use the correct parameters? Who has an idea, what mistake?
>
> Thanks!
>
> Best, André
>
> --
>
> The bash script:
>
> #!/bin/bash
>
> source=/Volumes/LaCie\ d2\ Quadra\ v3/Backups.backupdb
> destination=/Volumes/G-DRIVE\ Thunderbolt\ 3
>
> #rsync_test=-n
>
> rsync_opt=-aHEAXXN
>
> echo "Kopiere Time Machine Backup ..."
> echo
>
> sudo /usr/local/bin/rsync \
> $rsync_test $rsync_opt --fileflags --fake-super --delete --stats \
> --log-file=/Users/andre/Desktop/log/rsync-$(date "+%Y%m%d%H%M").log \
> "$source" "$destination"
>
> exit 0
>
> --
>
> The error messages:
>
> iMac:~ andre$ /Users/andre/Desktop/Skripte/rsync_tm
> Kopiere Time Machine Backup ...
>
> rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 
> 3/Backups.backupdb/iMac/Latest": Operation not permitted (1)
> rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 
> 3/Backups.backupdb/iMac/2016-04-11-130912/Macintosh HD/Handbücher & 
> Informationen": Operation not permitted (1)
> rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 
> 3/Backups.backupdb/iMac/2016-04-11-130912/Macintosh HD/etc": Operation 
> not permitted (1)
> rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 
> 3/Backups.backupdb/iMac/2016-04-11-130912/Macintosh HD/tmp": Operation 
> not permitted (1)
> rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 
> 3/Backups.backupdb/iMac/2016-04-11-130912/Macintosh HD/var": Operation 
> not permitted (1)
> ^Crsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at 
> rsync.c(700) [sender=3.1.3]
> rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at 
> io.c(504) [generator=3.1.3]
> rsync: [receiver] write error: Broken pipe (32)
>
> --
>
> My search:
>
> iMac:~ andre$ ls -la /Volumes/LaCie\ d2\ Quadra\ v3/Backups.backupdb/iMac
> total 16
> drwxr-xr-x@ 61 root  staff  2074 16 Mär 21:02 .
> drwxr-xr-x+  6 root  staff   204  2 Jun  2012 ..
> drwxr-xr-x@  7 root  staff   238 11 Apr  2016 2016-04-11-130912 
> <tel:2016-04-11-130912>
> drwxr-xr-x@  7 root  staff   238 16 Mär 21:02 2018-03-16-210209 
> <tel:2018-03-16-210209>
> lrwxr-xr-x   1 root  staff    17 16 Mär 21:02 Latest -> 
> 2018-03-16-210209 <tel:2018-03-16-210209>
> iMac:~ andre$ ls -la /Volumes/G-DRIVE\ Thunderbolt\ 
> 3/Backups.backupdb/iMac/
> total 16
> drwxr-xr-x@ 61 root  staff  2074 16 Mär 21:02 .
> drwxr-xr-x@  6 root  staff   204  2 Jun  2012 ..
> drwxr-xr-x@  7 root  staff   238 11 Apr  2016 2016-04-11-130912 
> <tel:2016-04-11-130912>
> drwx------   2 root  staff    68 18 Mär 19:11 2018-03-16-210209 
> <tel:2018-03-16-210209>
> lrwxr-xr-x   1 root  staff    17 18 Mär 19:11 Latest -> 
> 2018-03-16-210209 <tel:2018-03-16-210209>
> iMac:~ andre$ ls -n /Volumes/LaCie\ d2\ Quadra\ v3/Backups.backupdb/iMac
> total 16
> drwxr-xr-x@ 7 0 20  238 11 <tel:20%20%C2%A0238%2011> Apr  2016 
> 2016-04-11-130912 <tel:2016-04-11-130912>
> drwxr-xr-x@ 7 0 20  238 16 <tel:20%20%C2%A0238%2016> Mär 21:02 
> 2018-03-16-210209 <tel:2018-03-16-210209>
> lrwxr-xr-x  1 0  20   17 16 Mär 21:02 Latest -> 2018-03-16-210209 
> <tel:2018-03-16-210209>
> iMac:~ andre$ ls -n /Volumes/G-DRIVE\ Thunderbolt\ 
> 3/Backups.backupdb/iMac/
> total 16
> drwxr-xr-x@ 7 0 20  238 11 <tel:20%20%C2%A0238%2011> Apr  2016 
> 2016-04-11-130912 <tel:2016-04-11-130912>
> drwx------  2 0  20   68 18 Mär 19:11 2018-03-16-210209 
> <tel:2018-03-16-210209>
> lrwxr-xr-x  1 0  20   17 18 Mär 19:11 Latest -> 2018-03-16-210209 
> <tel:2018-03-16-210209>
> iMac:~ andre$ mount
> /dev/disk0s2 on / (hfs, local, journaled)
> devfs on /dev (devfs, local, nobrowse)
> map -hosts on /net (autofs, nosuid, automounted, nobrowse)
> map auto_home on /home (autofs, automounted, nobrowse)
> /dev/disk1s2 on /Volumes/G-DRIVE Thunderbolt 3 (hfs, local, nodev, 
> nosuid, journaled)
> /dev/disk2s2 on /Volumes/LaCie d2 Quadra v3 (hfs, local, nodev, 
> nosuid, journaled)
>
>




More information about the rsync mailing list