prune.rst.inc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. _attic_prune:
  2. attic prune
  3. -----------
  4. ::
  5. usage: attic prune [-h] [-v] [-H HOURLY] [-d DAILY] [-w WEEKLY] [-m MONTHLY]
  6. [-y YEARLY] [-p PREFIX]
  7. REPOSITORY
  8. Prune repository archives according to specified rules
  9. positional arguments:
  10. REPOSITORY repository to prune
  11. optional arguments:
  12. -h, --help show this help message and exit
  13. -v, --verbose verbose output
  14. -H HOURLY, --hourly HOURLY
  15. number of hourly archives to keep
  16. -d DAILY, --daily DAILY
  17. number of daily archives to keep
  18. -w WEEKLY, --weekly WEEKLY
  19. number of daily archives to keep
  20. -m MONTHLY, --monthly MONTHLY
  21. number of monthly archives to keep
  22. -y YEARLY, --yearly YEARLY
  23. number of yearly archives to keep
  24. -p PREFIX, --prefix PREFIX
  25. only consider archive names starting with this prefix
  26. The prune command prunes a repository by deleting archives not matching any of
  27. the specified retention options. This command is normally used by automated
  28. backup scripts wanting to keep a certain number of historic backups. As an
  29. example, "-d 7" means to keep the latest backup on each day for 7 days. Days
  30. without backups do not count towards the total. The rules are applied from
  31. hourly to yearly, and backups selected by previous rules do not count towards
  32. those of later rules. Dates and times are interpreted in the local timezone,
  33. and weeks go from Monday to Sunday. Specifying a negative number of archives
  34. to keep means that there is no limit. If a prefix is set with -p, then only
  35. archives that start with the prefix are considered for deletion and only those
  36. archives count towards the totals specified by the rules.
  37. Description
  38. ~~~~~~~~~~~