Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2014 18:08:17 +0000
From:      Johannes Totz <johannes@jo-t.de>
To:        freebsd-fs@freebsd.org
Subject:   Re: Snapshots and what not to snapshot
Message-ID:  <m2raeh$9ek$2@ger.gmane.org>
In-Reply-To: <alpine.BSF.2.00.1410120128570.6601@woozle.rinet.ru>
References:  <alpine.BSF.2.00.1410120128570.6601@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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@hourly
zfs snapshot -r pool@house
zfs snapshot -r pool@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@FreeBSD.org ]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
> ------------------------------------------------------------------------
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2raeh$9ek$2>