Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to exclude a dataset from a recursive snapshot... #68

Open
sean- opened this issue Jul 13, 2015 · 6 comments
Open

Ability to exclude a dataset from a recursive snapshot... #68

sean- opened this issue Jul 13, 2015 · 6 comments

Comments

@sean-
Copy link

sean- commented Jul 13, 2015

We have a zpool that has a ton of datasets that come and go, but we also have swap on the same zpool. We want to use the recursive snapshot feature without snapping the swap dataset. I thought this existed, but maybe not?

@otraupe
Copy link

otraupe commented Nov 13, 2015

That would be nice. I have a backup data set there which shouldn't be snapshotted because the pool would be depleted in no time.

@aqw
Copy link
Collaborator

aqw commented Nov 17, 2015

@sean- @otraupe I agree, this would be a very handy feature. I currently just work around it by calling targets in one call.

However, while this would be nice, I don't see a clear path towards making this work when creating snapshots; destroying snapshots shouldn't be a problem.

How do you see the syntax working for something like this?

---Alex

@otraupe
Copy link

otraupe commented Nov 17, 2015

Alex, thanks for the reply!

Could you script-wise translate the recursive call to the zfs
snapshotting feature into single non-recursive ones?

Ole

Am 17.11.2015 um 11:04 schrieb Alex Waite:

@sean- https://github.com/sean- @otraupe
https://github.com/otraupe I agree, this would be a very handy
feature. I currently just work around it by calling targets in one call.

However, while this would be nice, I don't see a clear path towards
making this work when creating snapshots; destroying snapshots
shouldn't be a problem.

How do you see the syntax working for something like this?

---Alex


Reply to this email directly or view it on GitHub
#68 (comment).

@bougui
Copy link

bougui commented Sep 8, 2017

Hello all,

we would love to see and exclude list option, even if we know we can destroy those no require snapshot with a simple script, but having an option to exclude some dataset from zfssnap would be a very big plus for us 👍 .

An option could be something similar to rsync --exclude

see rsync man page
--exclude=PATTERN exclude dataset matching PATTERN
--exclude-from=FILE read exclude patterns from FILE

This would be great, because we would be able to provision a single ascii file matching dataset that we don't want snapshot for.

Thanks

Guillaume.

@bill-mcgonigle
Copy link

bill-mcgonigle commented Feb 8, 2019

the other script uses the com.sun:auto-snapshot=false property setting to mark excludes. I was attempting to switch over to zfsnap but ran into this issue.
We want to be able to add new filesystems ad hoc and have them snapshotted without editing the crontab but still be able to mark a few "temp" filesystems as having no snapshots.

@utrenkner
Copy link

I was just looking for such an option in zfsnap. I would fully support @bougui 's suggestion. That syntax (but without the equal sign) is used also by tar, tarsnap.

From FreeBSD's tar(1):

     --exclude pattern
	     Do	not process files or directories that match the	specified pat-
	     tern.  Note that exclusions take precedence over patterns or
	     filenames specified on the	command	line.

     [...]

     -X	filename, --exclude-from filename
	     Read a list of exclusion patterns from the	specified file.	 See
	     --exclude for more	information about the handling of exclusions.

Would be great to have this also in zfsnap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants