Understanding pruning

Nope, not necessary - if you only do daily backups.

Strictly speaking, only -keep 7:90 means:

Keep 1 snapshot every 7 day(s) if older than 90 day(s)

With no other -keeps, anything less than 90 days won’t get pruned at all. So IF you did hourly backups, you’d have 90 x 24 backups within that age range. :slight_smile: Otherwise, daily backups would leave the last 90 backups plus the weeklies beyond 90 days.

3 Likes

Thanks guys, I seem to understand how it works)
final question from me ))

this structure means
-keep 0:1800 -keep 90:730 -keep 30:365 -keep 7:180 -keep 3:90 -a

Keep 1 snapshot every 3 day(s) if older than 90 day(s)
Keep 1 snapshot every 7 day(s) if older than 180 day(s)
Keep 1 snapshot every 30 day(s) if older than 365 day(s)
Keep 1 snapshot every 730 day(s) if older than 730 day(s)
Keep no snapshot if older than 1800 day(s)

Right ?

Close. That outcome looks almost like the output you get when running prune… if you want to see exactly what it does without actually performing it, just add -dry-run to the command:

$ duplicacy prune -a -keep 0:1800 -keep 90:730 -keep 30:365 -keep 7:180 -keep 3:90 -dry-run

Keep no snapshots older than 1800 days
Keep 1 snapshot every 90 day(s) if older than 730 day(s)
Keep 1 snapshot every 30 day(s) if older than 365 day(s)
Keep 1 snapshot every 7 day(s) if older than 180 day(s)
Keep 1 snapshot every 3 day(s) if older than 90 day(s)
3 Likes

See also this topic: