[Trac-bugs] [PC-BSD Trac] #1062: Add comment or snapshot description field to warden zfsmksnap function

PC-BSD trac at pcbsd.org
Tue Mar 4 15:36:44 PST 2014


#1062: Add comment or snapshot description field to warden zfsmksnap function
-----------------------------+--------------------------
 Reporter:  srf21c           |      Owner:
     Type:  System Defect    |     Status:  new
 Priority:  minor            |  Milestone:
Component:  PBI System       |    Version:  10.1-RELEASE
 Keywords:  warden,snapshot  |
-----------------------------+--------------------------
 This feature request is inspired by similar functionality in the btrfs
 snapper utility. http://snapper.io/

 If you run the command "snapper list" on a btrfs enabled linux system,
 you'll get a table like the one below includes a description field towards
 the right.

 # snapper list

 Type   | #   | Pre # | Date                     | User | Cleanup  |
 Description   | Userdata
 single | 0   |       |                          | root |          |
 current       |
 single | 1   |       | Sat Feb 15 11:01:07 2014 | root | timeline |
 timeline      |
 single | 184 |       | Sun Mar  2 18:01:02 2014 | root | timeline |
 timeline      |
 single | 185 |       | Sun Mar  2 19:01:01 2014 | root | timeline |
 timeline      |
 single | 186 |       | Sun Mar  2 19:19:33 2014 | root |          | added
 new website |
 single | 187 |       | Sun Mar  2 20:01:03 2014 | root | timeline |
 timeline      |
 single | 188 |       | Sun Mar  2 21:01:02 2014 | root | timeline |
 timeline      |

 Note snapshot number 186 with the "added new website" comment. This is a
 snapshot that was created as a one-off and tagged with a custom
 description. All the other snapshots were automatically created by
 snapper's timeline feature.

 The ability to tag a snapshot with a comment is very useful for
 associating certain snapshots with certain changes made to the system.

 Currently the "warden zfslistsnap myjail" command lists only the snapshot
 date and time. This makes it more cumbersome than the snapper utility to
 associate specific snapshots with specific system changes.

 I might look at the time and date of a warden zfs jail snapshot and be
 hard pressed to remember if that was before or having making a certain
 system change. If I have the ability to explicitly note "this snapshot
 made before updating apache" then I know exactly which snapshot to
 rollback to in order to undo the apache upgrade.

 The snapper syntax to add a description to a snapshot is "snapper create
 -d "pre-test-repo".

 Something similar could be extended to the warden syntax like;

 warden zfsmksnap myjail -d "snapshot description comment here"

 Then when the "warden zfslistsnap myjail" command is issues, the output
 could look something like

 2014-02-27-01-03-59        upgraded mysql
 2014-03-04-15-01-28        added user bob
 2014-03-04-15-26-35        deleted temporary files from web subdir

--
Ticket URL: <http://trac.pcbsd.org/ticket/1062>
PC-BSD <http://trac.pcbsd.org>
PC-BSD Project Management


More information about the Trac-bugs mailing list