README 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. Overview
  2. --------
  3. atticmatic is a simple Python wrapper script for the Attic backup software
  4. that initiates a backup and prunes any old backups according to a retention
  5. policy. The script supports specifying your settings in a declarative
  6. configuration file rather than having to put them all on the command-line, and
  7. handles common errors.
  8. Here's an example config file:
  9. [location]
  10. # Space-separated list of source directories to backup.
  11. source_directories: /home /etc
  12. # Path to local or remote Attic repository.
  13. repository: user@backupserver:sourcehostname.attic
  14. [retention]
  15. # Retention policy for how many backups to keep in each category.
  16. keep_daily: 7
  17. keep_weekly: 4
  18. keep_monthly: 6
  19. Additionally, exclude patterns can be specified in a separate excludes config
  20. file, one pattern per line.
  21. Read more about Attic at https://attic-backup.org/
  22. atticmatic is hosted at http://torsion.org/hg/atticmatic/ and is mirrored on
  23. GitHub and BitBucket for convenience.
  24. Setup
  25. -----
  26. To get up and running with Attic, follow the Attic Quick Start guide at
  27. https://attic-backup.org/quickstart.html to create an Attic repository on a
  28. local or remote host.
  29. If the repository is on a remote host, make sure that your local root user has
  30. key-based ssh access to the desired user account on the remote host.
  31. To install atticmatic, run the following from the directory containing this
  32. README:
  33. python setup.py install
  34. Then copy the following configuration files:
  35. sudo cp sample/atticmatic.cron /etc/cron.d/atticmatic
  36. sudo mkdir /etc/atticmatic/
  37. sudo cp sample/config sample/excludes /etc/atticmatic/
  38. Lastly, modify those files with your desired configuration.
  39. Usage
  40. -----
  41. You can run atticmatic and start a backup simply by invoking it without
  42. arguments:
  43. atticmatic
  44. This will also prune any old backups as per the configured retention policy.
  45. By default, the backup will proceed silently except in the case of errors. But
  46. if you'd like to to get additional information about the progress of the
  47. backup as it proceeds, use the verbose option instead:
  48. atticmattic --verbose
  49. If you'd like to see the available command-line arguments, view the help:
  50. atticmattic --help
  51. Running tests
  52. -------------
  53. To install test-specific dependencies, first run:
  54. python setup.py test
  55. To actually run tests, run:
  56. nosetests --detailed-errors
  57. Feedback
  58. --------
  59. Questions? Comments? Got a patch? Contact witten@torsion.org