Snapshots and what not to snapshot
Johannes Totz
johannes at jo-t.de
Wed Oct 29 18:08:37 UTC 2014
On 11/10/2014 22:38, Dmitry Morozovsky wrote:
> Colleagues,
>
> reading some last threads I'm starting to think again about the problem I
> thought about for many times, but invent nothing but crude hacks:
>
> it would be great to have a mechanism to exclude some subtrees from recursive
> snapshots; the model is like:
>
> you have some tree of ZFS file systems, like
>
> pool/path/r
> pool/path/jails
> pool/path/jails/j1
> pool/path/jails/j1/obj
> ..
> pool/path/persistent
> pool/path/obj
>
> or something alike.
>
> To have the ability to make consistent backup, one would use ``zfs snapshot
> -r''
>
> but -- before using zfs send or other replication machanisms it would be
> feasible to remove snapshots of not-so-important filesystems.
Not just remove but exclude from snapshotting in the first place.
>
> For now, the kludge I could see is to set on these some artificial property
> like org.freebsd:nodump or similar, then traverse zfs list with this attribute
> and delete non-needed snapshots.
snapshot -r could inspect a property on children and skips snapshot
creation if some criteria are fullfilled.
For example:
zfs set org.freebsd:skip_recursive_snapshot=hou.* pool/backup
zfs snapshot -r pool at hourly
zfs snapshot -r pool at house
zfs snapshot -r pool at important
The skip property could be a regex that is matched against the
to-be-created snapshot name. If it matches, no snaps for that child and
its children recursively.
>
> Maybe somewhere there are more elegant solutions?
>
> Sincerely,
> D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
> [ FreeBSD committer: marck at FreeBSD.org ]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
> ------------------------------------------------------------------------
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>
More information about the freebsd-fs
mailing list