I’ve read the command docs here:
The prune command has the task of deleting old/unwanted revisions and unused chunks from a storage.
Click here for a list of related forum topics.
duplicacy prune - Prune snapshots by revision, tag, or retention policy
duplicacy prune [command options]
-id <snapshot id> delete snapshots with the specified id instead of the default one
-all, -a match against all snapshot IDs
-r <revision> [+] delet…
As well as various threads tagged with “prune” which ask similar questions:
I’m having a difficulty understanding how the -keep option in prune works.
What I’d like to achieve is, that I take a backup every hour continuously but prune them to have these kept,
Hourly backups for the last 24 hours (Examples all talk about daily pruning but is this possible?)
Daily backups for the last 7 days
Weekly backups for the last 5 weeks
Monthly backups for the last 12 months
I’m probably wrong but got it set up like this (except the hourly part).
duplicacy prune -keep 1:1 -ke…
Doing a bit of prune testing with duplicacy cli and running into issues - perhaps I misunderstand what’s going on.
Let’s say that I want to delete an entire remote backup, but keep my current files. For the purposes of this example, I have a folder named source and one named remote. They are both local (for simplicity).
I have done the following:
echo "this is a test" > test.txt
duplicacy init archive /path/to/remote
duplicacy backup (repeat 5 times to make 5 dummy snaps…
I believe I understand the algorithm used by the command when executed, however I’m struggling to create a command that reflects what I actually want.
I continually run duplicacy every 6 hours and want to keep everything for the last week (days 0-7), one per day for the remainder of the next two months (days 8-60), one per week for the rest of the year (days 61-360) and then one per year indefinitely. I don’t need these collections to be precise, just regular.
I’ve gotten this so far:
duplicacy prune -keep 365:365 -keep 7:60 -keep 1:7
I think I have the last two clauses right, but am struggling with the first one (one per year indefinitely).
Any thoughts welcome!