Matt Parkinson

MSci + ARCS + PhD + DIC

Analytical Scientist

Field Service Engineer

NMR Spectroscopist

Doodle Creator

Maker

Matt Parkinson

MSci + ARCS + PhD + DIC

Analytical Scientist

Field Service Engineer

NMR Spectroscopist

Doodle Creator

Maker

Project

ReadyNAS TimeMachine Verification Issues

16 Mar 2012 IT

Every so often, when my laptop runs out of battery during a backup, I receive the following: “Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you.”

Not only does it take a long time to create a new full backup but it also removes all incremental changes.

Looking around the internet I found this article and it works great to fix the image as opposed to just delete it and start again. No credit for working this out just wanted to repeat the instructions here in a way that I understand.

Mount the remote volume were the sparse bundle used for time machine is stored:

afp://nas.local/Backup

Open Terminal and login as root:

sudo su -

Change the flag of the sparsebundle:

chflags -R nouchg /Volumes/Backup/Matt's Laptop.sparsebundle

This may take a while. Then run fsck on the bundle:

hdiutil attach -nomount -noverify -noautofsck /Volumes/Backup/Matt's Laptop.sparsebundle

You will see the following:

/dev/diskx Apple_partition_scheme
/dev/diskxs1 Apple_partition_map
/dev/diskxs2 Apple_HFSX

where x is the disk ID for the backup volume.

The status of fsck can be monitored by looking at the fsck_hfs log:

tail -f /var/log/fsck_hfs.log

Running fsck on the sparse bundle will take a few hours so just let it run. The process will either end with either:

“The Volume was repaired successfully”
or
“The Volume could not be repaired”

If the volume could not be repared fsck can be run again using different options:

fsck_hfs -drfy /dev/diskxs2

Again this will take some time and hopefully at the end this command will now return “The Volume was repaired successfully”.

Now the disk needs to be detached:

hdiutil detach /dev/diskxs2

Finally the plist within the sparse bundle needs to be manually edited to remove the following lines:

RecoveryBackupDeclinedDate
{whatever-the-date}

Also the verification state need to be changed from:

VerificationState 2

to

VerificationState 0

The volume can now be ejected and Time Machine should proceed once again as normal.