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 drwxr-xr-x@ 7 root staff 238 16 Mär 21:02 2018-03-16-210209 lrwxr-xr-x 1 root staff 17 16 Mär 21:02 Latest -> 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 drwx------ 2 root staff 68 18 Mär 19:11 2018-03-16-210209 lrwxr-xr-x 1 root staff 17 18 Mär 19:11 Latest -> 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 Apr 2016 2016-04-11-130912 drwxr-xr-x@ 7 0 20 238 16 Mär 21:02 2018-03-16-210209 lrwxr-xr-x 1 0 20 17 16 Mär 21:02 Latest -> 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 Apr 2016 2016-04-11-130912 drwx------ 2 0 20 68 18 Mär 19:11 2018-03-16-210209 lrwxr-xr-x 1 0 20 17 18 Mär 19:11 Latest -> 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20180319/81aa8042/attachment.html>
At 11:22 19.03.2018, 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. > >Did I use the correct parameters? Who has an idea, what mistake? > >rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/iMac/Latest": Operation not permitted (1)Looks to me more like you have not enough rights to set times etc. So you'd need to run the script as root. bye Fabi
--fake-user means store that metadata in file xattrs rather than on the files themselves. I douby Time Machine understands that. 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) > >-- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 224 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/rsync/attachments/20180319/ec6e362d/signature.sig>
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) > >
On 2018-03-19, at 3:22 AM, Andre Althoff via rsync <rsync at lists.samba.org> 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. >... Instead of using rsync, can you use disk utility to copy the disc image from your old drive your new drive? Unless rsync is smart enough to know how to do hard links on directories (a new feature added to the file system to support Time Machine), the copy will not work anyways --- Entertaining minecraft videos http://YouTube.com/keybounce