ZFS TimeMachine (jollyjinx)

Moderators: jhartley, MSR734, nola

ZFS TimeMachine (jollyjinx)

Post by grahamperrin » Wed Jul 10, 2013 6:09 pm

jollyjinx/ZFS-TimeMachine on GitHub

Time Machine® style backups for ZFS users. It will backup from one pool to another host or pool by sending snapshots, deleting old ones in Time Machine style.

The script is recently improved (2013-06-23) – using caches per dataset to speed up operation.

For me the improvement is very noticeable. YMMV.

Our thanks to Patrick a.k.a. Jolly!

Links

Local/Remote Backups TimeMachine style, automatic scrub (2012-09-18) – includes some discussion unrelated to Patrick's work.

Need Help with a Backup Solution (2012-10-26)

ZFS TimeMachine style backups update (2012-11-20) – includes some discussion unrelated to Patrick's work.

Time Machine is an Apple trademark.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

cannot create snapshot … dataset already exists

Post by grahamperrin » Sun Nov 17, 2013 1:11 am

Running Patrick's script this morning, manually, I never saw anything like this before:

Code: Select all
gpes3e-gjp4:2013-06 gjp22$ cd ~/Documents/com/github/jollyjinx/ZFS-TimeMachine/2013-06 && sudo ./zfstimemachinebackup.perl --sourcedataset=zhandy --destinationdataset=tall/backups/zhandy --createsnapshotonsource --recursive --verbose --snapshotstokeeponsource=48
Found Keytime: 86400 Valuetime: 300
Found Keytime: 604800 Valuetime: 3600
Found Keytime: 7776000 Valuetime: 86400
Found Keytime: 31471200 Valuetime: 604800
Found Keytime: 314712000 Valuetime: 2635200
cannot create snapshot 'zhandy@2013-11-17-054625': dataset already exists
no snapshots were created
Could not create snapshot:zhandy@2013-11-17-054625
Could not create snapshot on zhandy at ./zfstimemachinebackup.perl line 76.
gpes3e-gjp4:2013-06 gjp22$


When I listed today's snapshots of that dataset … 

Code: Select all
gpes3e-gjp4:2013-06 gjp22$ zfs list -t snapshot | grep zhandy@2013-11-17-
tall/backups/zhandy@2013-11-17-002147                                  8Ki       -   386Gi  -
tall/backups/zhandy@2013-11-17-012147                                  8Ki       -   386Gi  -
tall/backups/zhandy@2013-11-17-013823                                868Ki       -   386Gi  -
tall/backups/zhandy@2013-11-17-021430                                  8Ki       -   386Gi  -
tall/backups/zhandy@2013-11-17-021741                                    0       -   386Gi  -
zhandy@2013-11-17-002147                                                 0       -   386Gi  -
zhandy@2013-11-17-012147                                                 0       -   386Gi  -
zhandy@2013-11-17-013823                                             860Ki       -   386Gi  -
zhandy@2013-11-17-021430                                                 0       -   386Gi  -
zhandy@2013-11-17-021741                                                 0       -   386Gi  -
zhandy@2013-11-17-024626                                                 0       -   386Gi  -
zhandy@2013-11-17-034626                                                 0       -   386Gi  -
zhandy@2013-11-17-044625                                                 0       -   386Gi  -
zhandy@2013-11-17-054625                                            1.12Mi       -   386Gi  -
gpes3e-gjp4:2013-06 gjp22$


… the answer became clear: an automated snapshot got there first (in my case, hourly by com.getgreenbytes.zfs.autosnapshots).

Nice work by Patrick. The conflict is handled properly.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron