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

tar: fixed precision of PRUNE_BACKUPS_DAYS to correctly prune at the day value given #206

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

itzg
Copy link
Owner

@itzg itzg commented Sep 29, 2024

It turns out the precision of -mtime is a bit fuzzy where a value of 1 ends up matching files older than 2 days:

When find
figures out how many 24-hour periods ago the file was last accessed, any fractional
part is ignored, so to match -atime +1, a file has to have been accessed at least
two days ago.

Using -mmin instead, which now also allows for fractional values of PRUNE_BACKUPS_DAYS

Reported in Discord

@itzg itzg added the bug Something isn't working label Sep 29, 2024
@itzg itzg merged commit e7ffe91 into master Sep 29, 2024
1 check passed
@itzg itzg deleted the fix/prune-backups-days-precisions branch September 29, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant