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

Allow unixtime-style timestamp extraction #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rsommer
Copy link

@rsommer rsommer commented Feb 8, 2021

Some backup solutions prefer using UNIX timestamps for tagging backup files or directories. In order to enable the rotation of such files/directories some extra handling is added to enable scanning for UNIX timestamps in file- or directory-names.

@rsommer rsommer force-pushed the allow_unix_timestamp_scanning branch 2 times, most recently from 358b367 to 1060e30 Compare February 8, 2021 12:40
@coveralls
Copy link

coveralls commented Feb 8, 2021

Coverage Status

Coverage increased (+0.3%) to 93.056% when pulling e4dfae5 on rsommer:allow_unix_timestamp_scanning into 32e966c on xolox:master.

@rsommer rsommer force-pushed the allow_unix_timestamp_scanning branch from 7b6b962 to e4dfae5 Compare February 8, 2021 13:46
@neopostmodern
Copy link

Are there plans to still merge this?

@dfredell
Copy link

dfredell commented May 4, 2022

We would also be interested in this feature. @xolox Is this repo still maintained?

@@ -155,8 +155,9 @@ intended you have no right to complain ;-).
usage of the ``-H``, ``--hourly`` option for details about ``COUNT``."
"``-t``, ``--timestamp-pattern=PATTERN``","Customize the regular expression pattern that is used to match and extract
timestamps from filenames. ``PATTERN`` is expected to be a Python compatible
regular expression that must define the named capture groups 'year',
'month' and 'day' and may define 'hour', 'minute' and 'second'."
regular expression that must define a named capture group 'unixtime' or the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsommer can you provide better documentations or an example of how to use this new unixtime capture group? I had to read the test case to understand it. There is a section lower in the docs containing some Regex examples, Supported configuration options. That would be a good spot for more elaboration.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a short example to the README file, hope that helps - otherwise this seems to be abandoned, since the original pull request was untouched for over a year :(

Some backup solutions prefer using UNIX timestamps for tagging backup
files or directories. In order to enable the rotation of such
files/directories some extra handling is added to enable scanning for UNIX
timestamps in file- or directory-names.
@rsommer rsommer force-pushed the allow_unix_timestamp_scanning branch from e4dfae5 to d775f3c Compare May 5, 2022 06:12
@aroberts
Copy link

aroberts commented Aug 4, 2022

I assume you've worked around this, after all this time, but I published a docker image (here) of my fork (here), which includes your PR. I am not planning to maintain anything in pypi as it's outside my use case, but hopefully this is useful to someone.

https://hub.docker.com/repository/docker/aroberts/rotate-backups

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

Successfully merging this pull request may close these issues.

None yet

5 participants