Closed JeuJeus closed 1 month ago
I'm not entirely sure I understand who is changing the mod time in your setup yet. Is that you testing the prune feature and backdating files or is this happening without you doing anything?
Eligibility for pruning is happening by looking at files' mtimes: https://github.com/offen/docker-volume-backup/blob/52787a1e42024ca300d505566da9c16f8e897478/internal/storage/local/local.go#L116
Looking at the logs it seems no files match (yet), so there is nothing to be done. I.e. to debug this we'd need to find out if your files mtimes are changed inadvertently, and in case yes, who is doing that. I can't see such a behavior running the same image version.
That is indeed a good point. Is there some kind of debug flag i can activate to increase log verbosity?
I have for now removed all logs where the modification date does not match the timestamp in their filename. Will have a look and try to find out if there is some other application potentially interfering.
Is there some kind of debug flag i can activate to increase log verbosity?
Not really. From what I understand the easiest way to audit files for changes is using auditd: https://serverfault.com/questions/320716/find-out-which-process-is-changing-a-file
Closing this as there hasn't been any further information and there's nothing actionable as of now. If you require further assistance, feel free to reopen.
Describe the bug I'm utilizing docker-volume-backup for the backup management of several container volumes. I have configured the auto prune of backups after 30 days of retention. Whilst the nightly cron is displaying that a growing number of backups is present, 58++, none is deleted/pruned.
This is potentially happening due to the backup prune validation changing the modified date - therefore not pruning the backups? Is the "age" of the backups defined by their name or the modfiied time here?
To Reproduce Steps to reproduce the behavior:
ime=2024-10-10T05:27:20.515Z level=INFO msg="Successfully scheduled backup from environment with expression @daily" time=2024-10-11T00:00:00.100Z level=INFO msg="Now running script on schedule @daily" time=2024-10-11T00:00:00.112Z level=INFO msg="Stopping 1 out of 35 running container(s) as they were labeled docker-volume-backup.stop-during-backup=portainer-backup." time=2024-10-11T00:00:00.450Z level=INFO msg="Created backup of
/backup
at/tmp/portainer-backup-2024-10-11T00-00-00.tar.gz
." time=2024-10-11T00:00:00.722Z level=INFO msg="Restarted 1 container(s)." time=2024-10-11T00:00:00.724Z level=INFO msg="Stored copy of backup/tmp/portainer-backup-2024-10-11T00-00-00.tar.gz
in/archive
." storage=Local time=2024-10-11T00:00:00.724Z level=INFO msg="None of 59 existing backups were pruned." storage=Local time=2024-10-11T00:00:00.725Z level=INFO msg="Removed tar file/tmp/portainer-backup-2024-10-11T00-00-00.tar.gz
."