clone / copy snapshot via shell command

Status
Not open for further replies.

odoyle

Explorer
Joined
Sep 2, 2014
Messages
62
Hi all,
I have a recurring issue with corrupt time machine backups ("Time Machine completed a verification of your backups" blah blah). My solution is just to go back a couple hours to an earlier snapshot. I'd like to make this process quicker, and I think this is what I want.. but can someone confirm?

http://docs.oracle.com/cd/E19253-01/819-5461/gcvfl/index.html

Basically these are instructions to clone and overwrite the corrupt file system with the older uncorrupt snapshot.
Is this a valid approach for freenas? Is this the recommended approach?

Thanks!
 

odoyle

Explorer
Joined
Sep 2, 2014
Messages
62
I can't seem to figure out how to do this.. where are the snapshots actually located (to be able to use the zfs clone command) ?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
where are the snapshots actually located
You seem to be thinking of snapshots as standalone objects. In fact, they are properties of datasets. To see all the snapshots you have, go to Storage | Snapshots in the GUI.
 

odoyle

Explorer
Joined
Sep 2, 2014
Messages
62
I'm trying to automate this process using command line, not the GUI. I'm assumming I can do some variation of "zfs clone snapshot_name" if I ssh or use the shell? These are the steps I currently take when time machine backups get corrupt (currently happens once every couple months):
  1. turn off time machine and remove backup disk from time machine list
  2. delete file:
    Code:
    rm /Library/Preferences/com.apple.TimeMachine.plist
  3. delete corrupt backup:
    Code:
    sudo rsync -a --delete ~/empty/ /mnt/vol1/TMbackup/paul.sparsebundle
  4. restart mac
  5. clone snapshot in GUI and copy to original location:
    Code:
    mv TMbackup-auto-20151202.0700-1m-clone/paul.sparsebundle paul.sparsebundle
  6. unmount cloned snapshot
  7. reenable time machine
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
My solution is to use a combination of weekly bootable clones with CCC, and Arq Backup over SSH for data. Time Machine over AFP is just too flaky for me to rely on. YMMV.
 
Status
Not open for further replies.
Top