Hallo zusammen,
erstmal freue ich mich, dass es Ubuntu und diese Gemeinde hier weiter gibt! ☺ Ich war auch lange hier unterwegs und daher nehme ich dieses Forum aktuell als Anlaufstelle, obwohl ich gerade einen Mac benutze.
Ich möchte gerne ein Time Machine Backup von einer externen auf eine andere externe Festplatte kopieren. Um hier die richtigen Optionen zu finden, habe ich die komplette Manual von rsync durchgelesen und schließlich wie folgt das Script erstellt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #!/bin/bash # Kopiert ein Time Machine Backup auf anderes Laufwerk und überprüft dieses # anhand von Prüfsummen. # erstellt von :-) am 28.02.2018 ################### # variabler Bereich #source="/Volumes/Time\ Machine\ Backup/Test\ 1" #destination="/Volumes/G-DRIVE\ Thunderbolt\ 3" # -n, --dry-run perform a trial run with no changes made #rsync_opt1="-n" # variabler Bereich Ende ######################## # verwendete rsync Optionen # -c, --checksum skip based on checksum, not mod-time & size # -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) # -r, --recursive recurse into directories # -l, --links copy symlinks as symlinks # -p, --perms preserve permissions # -t, --times preserve modification times # -g, --group preserve group # -o, --owner preserve owner (super-user only) # -D same as --devices --specials # -H, --hard-links preserve hard links # -E, --executability preserve executability # -A, --acls preserve ACLs (implies -p) # -X, --xattrs preserve extended attributes # -N, --crtimes preserve create times (newness) rsync_opt2="-caHEAXN" # --devices preserve device files (super-user only) # --specials preserve special files # --fileflags preserve file-flags (aka chflags) # --delete delete extraneous files from dest dirs ### --stats give some file-transfer stats # --rsync-path=PROGRAM specify the rsync to run on remote machine # --log-file=FILE log what we're doing to the specified FILE # -x, --one-file-system don't cross filesystem boundaries echo "Kopiere Time Machine Backup ..." echo rsync $rsync_opt1 $rsync_opt2 --devices --specials --fileflags --delete \ --rsync-path="sudo rsync" \ --log-file=/Users/andre/Desktop/log/rsync-$(date "+%Y%m%d%H%M").log \ /Volumes/Time\ Machine\ Backup/Backups.backupdb /Volumes/G-DRIVE\ Thunderbolt\ 3 #$source $destination echo echo "Time Machine Backup erfolgreich kopiert" exit 0 |
Das Backup scheint ziemlich komplett zu sein, allerdings erhalte ich Fehlermeldungen und das Script bleibt hängen.
Kopiere Time Machine Backup ...
rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac": Operation not permitted (1)
rsync: symlink "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/Latest" -> "2018-03-06-221601" failed: Operation not permitted (1)
rsync: recv_generator: mkdir "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-04-11-130912" failed: Operation not permitted (1)
*** Skipping any contents from this failed directory ***
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.BackupMachineAddress") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.HasRecoverySet") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.HostUUID") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.ModelID") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.RecoveryPartitionLastModificationDate") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.RecoveryPartitionVolumeUUID") failed: Operation not permitted (1)
rsync: rsync_xal_set: lsetxattr(""/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac"","com.apple.backupd.RecoverySetName") failed: Operation not permitted (1)
rsync: failed to set times on "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac": Operation not permitted (1)
rsync: stat "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-04-11-130912" failed: No such file or directory (2)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: recv_generator: mkdir "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-05-01-173706" failed: Operation not permitted (1)
*** Skipping any contents from this failed directory ***
rsync: stat "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-05-01-173706" failed: No such file or directory (2)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
rsync: recv_generator: mkdir "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-05-21-135051" failed: Operation not permitted (1)
*** Skipping any contents from this failed directory ***
rsync: stat "/Volumes/G-DRIVE Thunderbolt 3/Backups.backupdb/André Althoffs iMac/2016-05-21-135051" failed: No such file or directory (2)
^Crsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(657) [sender=3.0.8]
Time Machine Backup erfolgreich kopiertWoran kann das liegen? Sind die Optionen richtig gesetzt, so dass Quelle und Ziel nachher absolut identisch sind?