I have multiple different repositories that backup to the same storage. Some of these repositories have different needs as far as retention, so instead of using prune -all
I have a series of prune commands that specify snapshot id and use -collect-only
and then one final call with just -delete-only
. From what I understand this should work for my needs. I run this from one repository directory. The problem I’m having is after running these I get:
Fossils from collection 1 can’t be deleted because deletion criteria aren’t met
From looking at the documentation I expected this after the first run, but I’m still getting this same line a week later even though I have run backups since. I noticed that every prune run reports Fossil collection 1 saved
. I also inspected the fossils directory at .duplicacy/cache/local/fossils/
and see that there is only one file (named 1
) that only contains information from the last prune command. Nothing from the other runs for other snapshot ids.
Example of my bash script:
#!/bin/bash
cd /root/duplicacy/data || exit 1
# Data - 1:day after 1 week, 1:week after 2 weeks, 1:month after 2 months, Nothing after 1 year
echo "Pruning data at $(date)"
duplicacy prune -id data -collect-only -keep 0:365 -keep 30:60 -keep 7:14 -keep 1:7
# Storage - 1:day after 1 week, 1:week after 1 month, 1:month after 6 months, 1:year after 3 years
echo "Pruning storage at $(date)"
duplicacy prune -id storage -collect-only -keep 365:1095 -keep 30:180 -keep 7:30 -keep 1:7
# Storage_temp - 1:day after 1 week, 1:week after 2 weeks, Nothing after 3 months
echo "Pruning storage_temp at $(date)"
duplicacy prune -id storage_temp -collect-only -keep 0:90 -keep 7:14 -keep 1:7
# Final deletion
echo "Running prune delete at $(date)"
duplicacy prune -delete-only
echo "Finished at $(date)"
Output from duplicacy -log -v prune -delete-only
:
2024-10-19 11:50:31.757 INFO REPOSITORY_SET Repository set to /srv/data
2024-10-19 11:50:31.758 INFO STORAGE_SET Storage set to /srv/backup/backup/duplicacy
2024-10-19 11:50:31.759 TRACE CONFIG_ITERATIONS Using 16384 iterations for key derivation
2024-10-19 11:50:31.832 TRACE SNAPSHOT_LIST_IDS Listing all snapshot ids
2024-10-19 11:50:31.833 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot 2
2024-10-19 11:50:31.833 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot data
2024-10-19 11:50:32.313 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot storage
2024-10-19 11:50:32.418 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot storage_temp
2024-10-19 11:50:32.466 INFO FOSSIL_COLLECT Fossil collection 1 found
2024-10-19 11:50:32.466 TRACE SNAPSHOT_NO_NEW No new snapshot from data since the fossil collection step
2024-10-19 11:50:32.466 TRACE SNAPSHOT_NO_NEW No new snapshot from storage_temp since the fossil collection step
2024-10-19 11:50:32.466 TRACE SNAPSHOT_NO_NEW No new snapshot from storage since the fossil collection step
2024-10-19 11:50:32.466 INFO FOSSIL_POSTPONE Fossils from collection 1 can’t be deleted because deletion criteria aren’t met
duplicacy -help
shows version:
VERSION:
3.2.3 (254953)
Is there something I’m doing wrong? I’m guessing I’ll at the very least have to run -exhaustive
to fix the current state, but will it just do the same thing again? Any help is appreciated.