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

FeatureRequest: Parameter --ignore-invalid-items or --time-from-string-regex #4

Open
OE2WNL opened this issue Mar 31, 2018 · 0 comments

Comments

@OE2WNL
Copy link

OE2WNL commented Mar 31, 2018

When using the --time-from-string parameter and not all input lines are in the expected match format timegaps exits with error

ERROR: Error while parsing time from item string. Error: time data u'pool/test@2018-03-29__14-11-35' does not match format 'storagepool/test@backup_%Y-%m-%d__%H-%M-%S'

As it happens that I have regular zfs snapshots with name 2018-03-29__14-30-00 but also other named snapshots when offsite-backup-script transferes snapshots to another system and creates a snapshot before transfering with name backup_2018-03-29__18-00-00

For this cases it would probably be usefull to have a --ignore-invalid-items parameter where the backup_... snapshots would be simply keept/accepted.

My command is as follows:
sudo zfs list -r -H -t snapshot -o name pool/test | timegaps --stdin --time-from-string "pool/test@%Y-%m-%d__%H-%M-%S" recent2,hours10,days30,weeks12,months14,years3

Probably also a --time-from-string-regex would be a solution - so User can use wildcards + date patterns for item selection.

Interested in what you think about my usecase.
Greetings
Wolfgang

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

1 participant