Mac sparsebundle snapshot clone problem

Status
Not open for further replies.

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Due to a problem with Time Machine, I cloned a recent snapshot of a dataset used for Time Machine, deleted the current contents of the dataset and copied the contents of the clone into it. This worked insofar as Time Machine successfully used yesterday's sparsebundle to create a new backup. But the dataset in question is now taking up nearly twice as much disk space. This is nothing to do with yesterday's snapshot being that different, as there were only a few megabytes of new data.

Is this a function of the snapshot cloning process, or is it more likely that 'cp -R' is duplicating hard linked files in the sparsebundle? Or something else?

Edit: and would it have been better to have shared the clone and transferred the files via the Mac client?
 
Last edited:

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
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. No cloning required.

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.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
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. No cloning required.

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.


Yours may be a better solution. It has occurred to me that zfs probably doesn't know that my cloned copy of the contents of the dataset is identical to the old snapshots and is storing both, doubling the data as a result. If I'm right then hopefully it will drop the old data when those snapshots expire (after 2 weeks in my case).

The fact that your snapshot immediately after the last successful backup worked seems to suggest that it is Freenas rather than the Mac causing the damage that makes the next backup fail - unless perhaps a Time Machine backup was interrupted by a third agency (such as a user). What do you think causes the problems?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It's a MacBook so I'm pretty sure it's from either closing the lid during a backup or the wireless dropping out.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
You're probably right - though I do try to avoid both!
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
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. No cloning required.

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.
That's interesting. But if you roll back to just before the failed backup, wouldn't Time Machine correctly think it is updating the last successful backup? Or is it because Tim Machine backups are hourly and snapshots are a longer interval, like daily? So there are unavoidably some successful TM backups that get lost when you roll back?

So far I haven't had any TM problems , but it's been less than a month on the FreeNAS server. I have tried restoring files via TM and it works perfectly.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
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.
 
Status
Not open for further replies.
Top