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

Use -mtime oder -ctime to find old backup files #102

Open
plettich opened this issue Jan 27, 2022 · 1 comment
Open

Use -mtime oder -ctime to find old backup files #102

plettich opened this issue Jan 27, 2022 · 1 comment

Comments

@plettich
Copy link
Collaborator

The atime or access time is often disabled on Linux for performance reasons. We should use -mtime or -ctime to find old backup files here:

BACKUP_CLEAN_CMD = "find {backup_dir} -atime +{backup_days} -delete"

@marcohald
Copy link

We have the same issue, on our system only mtime seems to work

root@privacyIDEA:~# find /var/lib/privacyidea/backup  -type f | wc -l
43
root@privacyIDEA:~# find /var/lib/privacyidea/backup  -type f -mtime +14 | wc -l
27
root@privacyIDEA:~# find /var/lib/privacyidea/backup  -type f -atime +14 | wc -l
0
root@privacyIDEA:~# find /var/lib/privacyidea/backup  -type f -ctime +14 | wc -l
0

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

2 participants