garycnew
Senior Member
### NOTE: This Time Capsule/Machine Repair is Specific to the Asuswrt-Merlin (with Netatalk) Implementation ###
Well... It finally happened. After over a year of flawless Time Machine backups to my Asuswrt-Merlin Time Capsule, I am receiving the dreaded error message: "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you."
My particular issue appears to be related to my external USB 3.0 hard drive beginning to degrade. I noticed that if I attempt to create a new file on the Time Capsule Volume it states that the file already exists, which it doesn't. Luckly, it does seem that the existing Time Capsule data is still readable from the degraded disk.
In an effort to salvage my existing Time Capsule data, I've attempted to follow several related resources:
### Turn Off Time Machine "Back Up Automatically" On All Apple Client Machines ###
### Safely Remove the External Hard Drive from Asuswrt-Merlin and Attach to Local Apple Machine ###
### Using Disk Utility create a New DMG Image of the External Hard Drive for Safe Keeping ###
Disk Utility > Right-Click [Disk] > Image from "[Disk]" > Save
### NOTE: If you're reading this and you have a healthy Time Capsule, you might consider creating a New DMG Image to avoid this situation ###
### Attempt to Repair the Time Capsule SparseBundle attached to the Local Apple Machine ###
### If you have issues getting fsck_hfs to successfully repair the SparseBundle, you may have to resort to the Rsync method, below ###
### Safely Return the External Hard Drive to Asuswrt-Merlin to Rsync the Time Capsule ###
### Rsync an Exact Copy of the Time Capsule (including Hard-Links) to a New External Hard Drive ###
### Should You Find Rsync Didn't Preserve User:Group and/or Permissions... Fix Them ###
### The Local and Remote Rsync Copies should be similar in size (less some dot files) ###
### Repeat the Attempt to Repair the Time Capsule SparseBundle attached to the Local Apple Machine ###
### Safely Return the New External Hard Drive to Asuswrt-Merlin to Verify Time Machine Backups ###
### On the Local Apple Machine holding the [Alt/Option] key select "Verify Backups" from the Time Machine Drop-Down Menu ###
or
### On the Local Apple Machine use tmutil to Verify Time Machine Backups ###
Now, I am receiving the error message: "Time Machine couldn't verify your backups, because verification was interrupted."
### Review of the Asuswrt-Merlin System Log shows the following errors: ###
### I'm fairly positive the .dat.nosync00d7.CgGAVN error is related to the Apple Finder application ###
### The developers at netatalk-admins suggested repairing the netatalk .AppleDB using the dbd tool ###
Even after a lengthy dbd repair, I continue to receive the error message: "Time Machine couldn't verify your backups, because verification was interrupted."
### Using the dbd tool, I attempt to force Recreate the netatalk .AppleDB ###
### Review of the Asuswrt-Merlin System Log shows the same issue even after Recreating the netatalk .AppleDB ###
Currently, this is where this effort has stalled.
### NOTE: DiskWarrior Didn't Seem to be Useful in my Situation ###
### HINT #1: Should You Need to Low-Level Format the New External Hard Drive to Ensure Drive Integrity ###
Disk Utility > Select [Disk] > Erase > Security Options > Select "This option writes a pass of random data and then a single pass of zeros over the entire disk."
### HINT #2: Should You Need to Restore Using the New DMG Image ###
### HINT #3: Should You Have Issues with Spotlight Caching the Time Capsule Volume - Add the Time Capsule Volume to the Spotlight Privacy Settings ###
### dot_clean ###
Well... It finally happened. After over a year of flawless Time Machine backups to my Asuswrt-Merlin Time Capsule, I am receiving the dreaded error message: "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you."
My particular issue appears to be related to my external USB 3.0 hard drive beginning to degrade. I noticed that if I attempt to create a new file on the Time Capsule Volume it states that the file already exists, which it doesn't. Luckly, it does seem that the existing Time Capsule data is still readable from the degraded disk.
In an effort to salvage my existing Time Capsule data, I've attempted to follow several related resources:
### Turn Off Time Machine "Back Up Automatically" On All Apple Client Machines ###
### Safely Remove the External Hard Drive from Asuswrt-Merlin and Attach to Local Apple Machine ###
### Using Disk Utility create a New DMG Image of the External Hard Drive for Safe Keeping ###
Disk Utility > Right-Click [Disk] > Image from "[Disk]" > Save
### NOTE: If you're reading this and you have a healthy Time Capsule, you might consider creating a New DMG Image to avoid this situation ###
### Attempt to Repair the Time Capsule SparseBundle attached to the Local Apple Machine ###
Code:
$ sudo chflags -R nouchg /Volumes/Time\ Capsule/Gary’s\ MacBook\ Pro.sparsebundle
$ sudo vi /Volumes/Time\ Capsule/Gary’s\ MacBook\ Pro.sparsebundle/com.apple.TimeMachine.MachineID.plist
...
### Delete RecoveryBackupDeclinedDate key & date ###
<key>RecoveryBackupDeclinedDate</key>
<date>2012-09-16T01:38:43Z</date>
...
### Change VerificationState to 0 ###
<key>VerificationState</key>
<integer>0</integer>
### NOTE: As Asuswrt-Merlin uses Netatalk for Time Capsule, I don't think it creates an actual SparsBundle Image as I was never able to get the hditutil commands to work as described ###
$ sudo hdiutil attach -nomount -noverify -noautofsck /Volumes/Time\ Capsule/Gary’s\ MacBook\ Pro.sparsebundle
/dev/diskx Apple_partition_scheme
/dev/diskXs1 Apple_partition_map
/dev/diskXs2 Apple_HFSX
$ sudo fsck_hfs -drf /dev/diskXs2
$ sudo hdiutil detach /dev/diskXs2
### I used the following commands to fsck the entire Time Capsule Volume ###
$ sudo diskutil list
...
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk3
1: EFI EFI 209.7 MB disk3s1
2: Apple_HFS Time Capsule 499.8 GB disk3s2
$ sudo diskutil umount /dev/disk3s2
$ sudo fsck_hfs -drf /dev/disk3s2
** /dev/rdisk3s2
** The volume Time Capsule was repaired successfully.
### If you have issues getting fsck_hfs to successfully repair the SparseBundle, you may have to resort to the Rsync method, below ###
### Safely Return the External Hard Drive to Asuswrt-Merlin to Rsync the Time Capsule ###
### Rsync an Exact Copy of the Time Capsule (including Hard-Links) to a New External Hard Drive ###
Code:
### MacOS (Doen't Preserve ID's) ###
$ sudo rsync -avH --delete --numeric-ids --progress admin@192.168.0.1:/tmp/mnt/Time_Capsule/* /Volumes/Time\ Capsule/
### Linux (Preserves ID's) ###
$ sudo apt-get install hfsprogs
$ sudo mount -t hfsplus -o remount,force,rw /media/user/Time\ Capsule
$ sudo rsync -avH --delete --numeric-ids --progress admin@192.168.0.1:/tmp/mnt/Time_Capsule/* /media/user/Time\ Capsule/
### Should You Find Rsync Didn't Preserve User:Group and/or Permissions... Fix Them ###
Code:
# chown -R 0:0 /tmp/mnt/Time_Capsule
# chown -R 99:99 /tmp/mnt/Time_Capsule/.fseventsd
# chown -R 99:99 /tmp/mnt/Time_Capsule/.Spotlight-V100
# chmod 600 /tmp/mnt/Time_Capsule/Gary’s\ MacBook\ Pro.sparsebundle/Info.*
# chmod 600 /tmp/mnt/Time_Capsule/Gary’s\ MacBook\ Pro.sparsebundle/com.*
# chmod 600 /tmp/mnt/Time_Capsule/Gary’s\ MacBook\ Pro.sparsebundle/.AppleDouble/Info.*
# chmod 600 /tmp/mnt/Time_Capsule/Gary’s\ MacBook\ Pro.sparsebundle/.AppleDouble/com.*
# chmod 666 /tmp/mnt/Time_Capsule/Gary’s\ MacBook\ Pro.sparsebundle/.dat.nosync00d7.CgGAVN
### The Local and Remote Rsync Copies should be similar in size (less some dot files) ###
Code:
$ sudo du -sk /Volumes/Time\ Capsule
344151112 /Volumes/Time Capsule
$ ssh admin@192.168.0.1
# du -sk /tmp/mnt/Time_Capsule
344233696 /tmp/mnt/Time_Capsule
### Repeat the Attempt to Repair the Time Capsule SparseBundle attached to the Local Apple Machine ###
### Safely Return the New External Hard Drive to Asuswrt-Merlin to Verify Time Machine Backups ###
### On the Local Apple Machine holding the [Alt/Option] key select "Verify Backups" from the Time Machine Drop-Down Menu ###
or
### On the Local Apple Machine use tmutil to Verify Time Machine Backups ###
Code:
$ sudo mkdir /Volumes/Backups.backupdb
$ sudo mount_afp -i afp://admin@gnutech-wap01/Backups.backupdb /Volumes/Backups.backupdb
$ mount
...
//admin@gnutech-wap01/Backups.backupdb on /Volumes/Backups.backupdb (afpfs)
$ sudo ls /Volumes/Backups.backupdb/
CNID
Gary’s MacBook Pro.sparsebundle
$ sudo tmutil destinationinfo
> ==================================================
Name : Backups.backupdb
Kind : Network
URL : afp://admin@gnutech-wap01._afpovertcp._tcp.local./Backups.backupdb
Mount Point : /Volumes/Backups.backupdb
ID : 7BA62C9E-F794-497B-8116-9399DA9D98C9
$ sudo tmutil machinedirectory
/Volumes/Time Machine Backups/Backups.backupdb/Gary’s MacBook Pro
$ sudo tmutil listbackups
/Volumes/Time Machine Backups/Backups.backupdb/Gary’s MacBook Pro/2021-07-20-212623
$ sudo tmutil compare -s
-------------------------------------
Added: 61.7M
Removed: 39.5M
Changed: 177.2M
Now, I am receiving the error message: "Time Machine couldn't verify your backups, because verification was interrupted."
### Review of the Asuswrt-Merlin System Log shows the following errors: ###
Code:
Jul 16 06:11:49 afpd[31073]: AFP3.3 Login by admin
Jul 16 06:12:36 afpd[30819]: ad_open: can't parse AppleDouble header.
Jul 16 06:12:36 afpd[30819]: ad->ad_ops->ad_header_read(path, ad, pst) failed: Input/output error
Jul 16 06:12:36 afpd[30819]: getfilparams(.dat.nosync00d7.CgGAVN): bad resource fork
### The developers at netatalk-admins suggested repairing the netatalk .AppleDB using the dbd tool ###
Code:
# /usr/bin/dbd -V
dbd 3.0.5
### The Unknown Extended Attributes option error is caused by the afp.conf being configured with ea = auto ###
# /usr/bin/dbd -stv -F /tmp/netatalk/afp.conf /tmp/mnt/Time_Capsule
Jul 16 06:14:24.826468 dbd[31980] {cnid_dbd.c:464} (D5:CNID): cnid_dbd_open: Finished initializing cnid dbd module for volume '/tmp/mnt/Time_Capsule'
adouble:v2 volume
Unknown Extended Attributes option: 0
# ps w|grep netatalk
14497 admin 4292 S afpd -F /tmp/netatalk/afp.conf
14500 admin 1864 S cnid_metad -F /tmp/netatalk/afp.conf
17481 admin 1212 D grep -i netatalk
### NOTE: You'll need to killall afpd, configure afp.conf with ea = ad, and manually start afpd to successfully run the dbd tool. Also, the safest, most reliable, and recommended cnid scheme = dbd ###
# killall afpd
# cat /tmp/netatalk/afp.conf
[Global]
uam list = uams_dhx.so,uams_dhx2.so
save password = no
vol dbpath = /tmp/mnt/Time_Capsule/CNID
sleep time = 1
hostname = gnutech-wap01.local
signature = gnutech-wap01
[Backups.backupdb]
path = /tmp/mnt/Time_Capsule
cnid scheme = dbd
ea = auto
time machine = yes
# vi /tmp/netatalk/afp.conf
...
ea = ad
# afpd -F /tmp/netatalk/afp.conf
# /usr/bin/dbd -tv -F /tmp/netatalk/afp.conf /tmp/mnt/Time_Capsule
# service restart_nasapps
# umount /tmp/mnt/Time_Capsule
# fdisk -l /dev/sdb
# fsck_hfs -drf /dev/sdb2
** The volume Time Capsule was repaired successfully.
Even after a lengthy dbd repair, I continue to receive the error message: "Time Machine couldn't verify your backups, because verification was interrupted."
### Using the dbd tool, I attempt to force Recreate the netatalk .AppleDB ###
Code:
# /usr/bin/dbd -ftv -F /tmp/netatalk/afp.conf /tmp/mnt/Time_Capsule
### Review of the Asuswrt-Merlin System Log shows the same issue even after Recreating the netatalk .AppleDB ###
Code:
Jul 17 06:19:33 cnid_dbd[12256]: Recreated CNID BerkeleyDB databases of volume "Backups.backupdb"
Jul 17 06:51:19 afpd[20895]: AFP3.3 Login by admin
Jul 17 06:51:26 afpd[20895]: ad_open: can't parse AppleDouble header.
Jul 17 06:51:26 afpd[20895]: ad->ad_ops->ad_header_read(path, ad, pst) failed: Input/output error
Jul 17 06:51:26 afpd[20895]: getfilparams(.dat.nosync00d7.CgGAVN): bad resource fork
Currently, this is where this effort has stalled.
### NOTE: DiskWarrior Didn't Seem to be Useful in my Situation ###
### HINT #1: Should You Need to Low-Level Format the New External Hard Drive to Ensure Drive Integrity ###
Disk Utility > Select [Disk] > Erase > Security Options > Select "This option writes a pass of random data and then a single pass of zeros over the entire disk."
### HINT #2: Should You Need to Restore Using the New DMG Image ###
Code:
$ sudo /usr/sbin/asr --source /Volumes/Macintosh\ SSD/Users/gnutech/Downloads/Time\ Capsule.dmg --target /Volumes/Time\ Capsule --erase --noverify --noprompt
### HINT #3: Should You Have Issues with Spotlight Caching the Time Capsule Volume - Add the Time Capsule Volume to the Spotlight Privacy Settings ###
### dot_clean ###
Last edited: