Time Machine volume keeps corrupting

Status
Not open for further replies.

mark543

Cadet
Joined
Jan 3, 2015
Messages
9
Hi,

I've created a volume to use time machine to back my MBP up to.

I made it using the following settings (and have tried a few others):

Gtj7Ref.png


Inevitably however, after a few days of it working ok, I always get the following error:

Qx8rlS5.png

Is there something I'm missing?
Thanks!
 

mark543

Cadet
Joined
Jan 3, 2015
Messages
9
Wow, ok thanks

My WiFi is pretty strong actually, my bed is right next to the router lol
Still, even so, that's bad if that's actually the reason why this is happening. Would this happen with an apple time capsule, or is it a problem with the protocol? Trying to work out where the weak link is here
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I've read reports of similar things happen ing with the time capsule. It is disconcerting behavior in a backup solution.

If it were me, I'd just stick with something simple and fool-proof like scripting an rsync task on the Mac and dropping the files in a datset with some sort of sane snapshot policy.
 

fta

Contributor
Joined
Apr 6, 2015
Messages
148
I finally had this happen again after several weeks. This will fix the backup so you don't have to delete it. There is definitely a bug either in the netatalk server or the time machine code, but it seems Apple is either unwilling or unable to fix it.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I wonder if it would be better to have atime off? Time Machine doesn't like anything being done to alter its backups, and I am not sure if this would count as an alteration. Just a thought, I have no idea if it is relevant.
 

hugovsky

Guru
Joined
Dec 12, 2011
Messages
567
I'm using timemachine and have a few months of backup done without problems. I can go as back as January. I'm using wireless, too. The fact that your so close to your router, can be a factor. Very close wireless links are almost as bad as very far. Test with cable. If all goes well, it's your wifi. I do have "atime" on but, my "share type" is set to unix.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Or you could always do a time machine backup to a USB hard drive (because time machine backups are nice for disaster recovery) and lock it in a fireproof safe. Update the time machine backup every quarter or so.

Then use rsync or some script-fu to perform incremental file backups to your NAS. This has the advantage that you can easily make your backups available to other clients on the network.

I've been burned in the past by fancy-pants backup software. I prefer to avoid layers of abstraction as much as possible.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I hesitate to mention the very simple, but it caught me out for a few months. If you forget to check and put the MBP in sleep mode while a backup is in progress this can result in an inconsistent database, just the same as a lost wireless connection.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
tl;dr

Time Machine is a sorry excuse for a backup solution that trades apparent simplicity for actually working. And it still requires you to jump through hoops or pay for a crummy router or time capsule.

Solution: Don't use it.

Workaround: Set everything up like the server is a nuclear reactor and the client is the sole backup generator (no pun intended) powering the emergency cooling systems. Ensure a fast, stable, reliable uninterrupted connection.
Like a nuclear reactor, it might still blow up - but that's because it's a shitty design. A proper reactor/backup solution doesn't just blow up.

[Edit: 500th like!]
 
Last edited:

katit

Contributor
Joined
Jun 16, 2015
Messages
162
FWIW time capsule stopped working for me on USB external drive also. It was working fine but then "got corrupted". When I tried FreeNAS for that - it was nothing but problems from beginning. And very slow even over wire.
 

grahamperrin

Dabbler
Joined
Feb 18, 2013
Messages
27
… Would this happen with an apple time capsule …

Yes, it can happen with Apple products such as Time Capsule.

Please see for example:

… There is definitely a bug either in the netatalk server or the time machine code …

Instead, consider the limitations of the HFS Plus file system. Plus a private framework –

/System/Library/PrivateFrameworks/DiskImages.framework


– and so on. The protective measures within Time Machine Server Requirements (expressed in Apple's Time Machine Network Interface Specification (TMNIS) document for developers) can not be a panacea.

… sleep mode while a backup is in progress this can result in an inconsistent database …

That should not happen.

In 2011 there was netatalk / Bugs / #382 Lacking Replay Cache, Macs hang on sleep during TM backup

… Thanks to the growing financial contribution of support subscribers, this feature could be implemented for 2.2.

– with netatalk now at version 3.1.8, it's most likely that the AFP replay cache was implemented.
 

grahamperrin

Dabbler
Joined
Feb 18, 2013
Messages
27
ZFS snapshots – of points in time when the data and metadata of the HFS Plus file system were good (or good enough)

… snapshots … rollback to … after a successful TM backup.

That's excellent advice.

Much faster than repairing the image.

… Time Machine backup. Rarely, they get corrupted … Rolling back to a time before corruption would be a cinch. Then Time Machine would automatically fill in everything new since that snapshot. …


OS X file system events

When I've encountered problems with TimeMachine, I look at the system log on the Mac to find when the last successful backup finished. I then find the snapshot that was taken after the backup, but before the next failed time machine backup and rollback the time machine dataset to that snapshot. …

I've recently discovered that this might cause problems with the deltas going forward; as in time machine thinks it is creating a delta between time D and F, when it should be B to F.

My theory was that fsevents tracks changed directories since the last backup. When a new backup starts those directories are compared to determine what needs to be actually transferred.

If you rollback, fsevents will be tracking changes since a more recent backup than you actually have. Now, I've seen log entries that indicate backupd is supposed to detect this state and perform a full comparison, but if it fails to detect this state the backup will miss some files. One time I noticed that the backup of my iTunes library was missing several apps. It sure looked like I was missing stuff that would have been in one of those missed deltas.

Over to Stack Exchange, to Super User. If we ignore, for a moment, the title of the question (Time Machine “Event store UUIDs don't match for volume” after swapping disk) there's a good answer http://superuser.com/a/342958/84988 – part of which should help to understand both com.apple.backupd.SnapshotVolumeLastFSEventID and 'Node requires deep traversal'. Deep traversal is also mentioned at Pondini's Time Machine - Troubleshooting A6. Common Backup Messages.

@fracai : with an understanding of those things, you may set aside thoughts of different time-based depths of delta.

I should treat the iTunes library puzzle as entirely separate.


Scripting and/or other enhancements

I usually check the logs on my Mac and rollback to whatever snapshot occurs between TimeMachine backups prior to the corruption.

For a long time now, I've wanted to put together a script that would monitor the system.log on my Mac and create a new snapshot of my TimeMachine dataset whenever a backup is completed. The backupd logs include what the name of the new backup is as well as indicating when the volume has been properly ejected. These are the "safe points" to roll back to whenever a backup is corrupted.

… if I get such a script together along with a solution to the rollback problem I'll start a new thread.

Rollback to a suitable snapshot should cause no problem. A subsequent Time Machine backups to that destination will involve a deep traversal, which may be unexpectedly time consuming and/or confusing to the end user, but that traversal is normal (technically not a problem).

A script will be welcome.

Also/alternatively if I recall correctly, the sparse bundle disk image includes – or sometimes includes – a file that may help to determine whether a ZFS snapshot is timely. When I find the required information (maybe in my AppleSeed archives) it'll probably lead to a FreeNAS feature request.


Luck

The ideal is a suitably scrubbed snapshot of a point in time immediately (or reasonably soon) after error-free completion of a backup by a Time Machine client.

Far less ideal: a snapshot taken during a backup. If you're lucky, then a ZFS rollback to that point will allow subsequent OS X attachment of the disk image to be followed by a successful replay of the HFS Plus journal.

(Further: an apparently successful replay may not result in an entirely good HFS Plus file sytem, but that's way beyond the scope of this topic.)
 
Last edited:

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I actually now have a script that monitors the system log and initiates a snapshot whenever time machine completes a backup. I'm away right now but I'll get it posted as soon as possible.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
But isn't it possible that Time Machine completes a backup, APPARENTLY successfully, but actually there are problems that are not found until Time Machine verifies backups (is that what you call deep traversal), which it does infrequently?

If so, you would have to go back to the snapshot before or immediately following the last successful verification.

I think the AFP implementation of Netatalk in FreeNAS is a bit shaky - just a bit.
 
Status
Not open for further replies.
Top