Changelog

The purpose of this document is to list all of the notable changes to this project. The format was inspired by Keep a Changelog. This project adheres to semantic versioning.

Release 8.1 (2020-05-17)

  • Bug fix to really make the ‘hour’, ‘minute’ and ‘second’ capture groups in user defined timestamp patterns optional (this fixes issue #26).
  • Fixed humanfriendly 8 deprecation warnings.

Release 8.0 (2020-02-18)

This is a bit of an awkward release:

  • An ImportError was reported in issue #24 caused by a backwards incompatible change in humanfriendly concerning an undocumented module level variable (shouldn’t have used that).
  • I’ve now updated rotate-backups to be compatible with the newest release of humanfriendly however in the mean time that package dropped support for Python 3.4.
  • This explains how a simple bug fix release concerning two lines in the code base triggered a major version bump because compatibility is changed.
  • While I was at it I set up Python 3.8 testing on Travis CI which seems to work fine, so I’ve documented Python 3.8 as compatible. Python 3.9 seems to be a whole other story, I’ll get to that soon.

Release 7.2 (2020-02-14)

Merged pull request #23 which makes it possible to customize the regular expression that’s used to match timestamps in filenames using a new command line option rotate-backups --timestamp-pattern.

The pull request wasn’t exactly complete (the code couldn’t have run as written, although it showed the general idea clear enough) so I decided to treat #23 as more of a feature suggestion. However there was no reason no to merge the pull request and use it as a base for my changes, hence why I decided to do so despite rewriting the code.

Changes from the pull request:

  • Renamed timestamp to timestamp_pattern to make it less ambiguous.
  • Added validation that custom patterns provided by callers define named capture groups corresponding to the required date components (year, month and day).
  • Rewrote the mapping from capture groups to datetime.datetime arguments as follows:
    • Previously positional datetime.datetime arguments were used which depended on the order of capture groups in the hard coded regular expression pattern to function correctly.
    • Now that users can define their own patterns, this is no longer a reasonable approach. As such the code now constructs and passes a dictionary of keyword arguments to datetime.datetime.
  • Updated the documentation and the command line interface usage message to describe the new command line option and configuration file option.
  • Added tests for the new behavior.

Release 7.1 (2020-02-13)

  • Make it possibly to disable system logging using rotate-backups --syslog=false (fixes #20).
  • Explicitly support numeric ionice classes (as required by busybox and suggested in #14):
    • This follows up on a pull request to executor (a dependency of rotate-backups) that was merged in 2018.
    • Since that pull request was merged this new “feature” has been implicitly supported by rotate-backups by upgrading the installed version of the executor package, however this probably wasn’t clear to anyone who’s not a Python developer 😇.
    • I’ve now merged pull request #14 which adds a test to confirm that numeric ionice classes are supported.
    • I also bumped the executor requirement and updated the usage instructions to point out that numeric ionice classes are now supported.

Release 7.0 (2020-02-12)

Significant changes:

  • Sanity checks are done to ensure the directory with backups exists, is readable and is writable. However #18 made it clear that such sanity checks can misjudge the situation, which made me realize an escape hatch should be provided. The new --force option makes rotate-backups continue even if sanity checks fail.
  • Skip the sanity check that the directory with backups is writable when the --removal-command option is given (because custom removal commands imply custom semantics, see #18 for an example).

Miscellaneous changes:

  • Start testing on Python 3.7 and document compatibility.
  • Dropped Python 2.6 (I don’t think anyone still cares about this 😉).
  • Copied Travis CI workarounds for MacOS from humanfriendly.
  • Updated Makefile to use Python 3 for local development.
  • Bumped copyright to 2020.

Release 6.0 (2018-08-03)

This is a bug fix release that changes the behavior of the program, and because rotate-backups involves the deletion of important files I’m considering this a significant change in behavior that deserves a major version bump…

It was reported in issue #12 that filenames that match the filename pattern but contain digits with invalid values for the year/month/day/etc fields would cause a ValueError exception to be raised.

Starting from this release these filenames are ignored instead, although a warning is logged to make sure the operator understands what’s going on.

Release 5.3 (2018-08-03)

  • Merged pull request #11 which introduces the --use-rmdir option with the suggested use case of removing CephFS snapshots.
  • Replaced --use-rmdir with --removal-command=rmdir (more general).

Release 5.2 (2018-04-27)

  • Added support for filename patterns in configuration files (#10).
  • Bug fix: Skip human friendly pathname formatting for remote backups.
  • Improved documentation using property_manager.sphinx module.

Release 5.1 (2018-04-27)

  • Properly document supported configuration options (#7, #8).
  • Properly document backup collection strategy (#8).
  • Avoid u'' prefixes in log output of include/exclude list processing.
  • Added this changelog, restructured the online documentation.
  • Added license key to setup.py script.

Release 5.0 (2018-03-29)

The focus of this release is improved configuration file handling:

  • Refactor configuration file handling (backwards incompatible). These changes are backwards incompatible because of the following change in semantics between the logic that was previously in rotate-backups and has since been moved to update-dotdee:

    • Previously only the first configuration file that was found in a default location was loaded (there was a ‘break’ in the loop).
    • Now all configuration files in default locations will be loaded.

    My impression is that this won’t bite any unsuspecting users, at least not in a destructive way, but I guess only time and a lack of negative feedback will tell :-p.

  • Added Python 3.6 to supported versions.

  • Include documentation in source distributions.

  • Change theme of Sphinx documentation.

  • Moved test helpers to humanfriendly.testing.

Release 4.4 (2017-04-13)

Moved ionice support to executor.

Release 4.3.1 (2017-04-13)

Restore Python 2.6 compatibility by pinning simpleeval dependency.

While working on an unreleased Python project that uses rotate-backups I noticed that the tox build for Python 2.6 was broken. Whether it’s worth it for me to keep supporting Python 2.6 is a valid question, but right now the readme and setup script imply compatibility with Python 2.6 so I feel half obliged to ‘fix this issue’ :-).

Release 4.3 (2016-10-31)

Added MacOS compatibility (#6):

  • Ignore stat --format=%m failures.
  • Don’t use ionice when not available.

Release 4.2 (2016-08-05)

  • Document default / alternative rotation algorithms (#2, #3, #5).
  • Implement ‘minutely’ option (#5).

Release 4.1 (2016-08-05)

  • Enable choice for newest backup per time slot (#5).
  • Converted RotateBackups attributes to properties (I ❤ documentability :-).
  • Renamed ‘constructor’ to ‘initializer’ where applicable.
  • Simplified the rotate_backups.cli module a bit.

Release 4.0 (2016-07-09)

Added support for concurrent backup rotation.

Release 3.5 (2016-07-09)

  • Use key properties on Location objects.
  • Bring test coverage back up to >= 90%.

Release 3.4 (2016-07-09)

Added support for expression evaluation for retention periods.

Release 3.3 (2016-07-09)

Started using verboselogs.

Release 3.2 (2016-07-08)

  • Added support for Python 2.6 :-P.

    By switching to the key_property support added in property-manager 2.0 I was able to reduce code duplication and improve compatibility:

    6 files changed, 20 insertions(+), 23 deletions(-)
    

    This removes the dependency on functools.total_ordering and to the best of my knowledge this was the only Python >= 2.7 feature that I was using so out of curiosity I changed tox.ini to run the tests on Python 2.6 and indeed everything worked fine! :-)

  • Refactored the makefile and setup.py script (checkers, docs, wheels, twine, etc).

Release 3.1 (2016-04-13)

Implement relaxed rotation mode, adding a --relaxed option (#2, #3).

Release 3.0 (2016-04-13)

  • Support for backup rotation on remote systems.
  • Added Python 3.5 to supported versions.
  • Added support for -q, --quiet command line option.
  • Delegate system logging to coloredlogs.
  • Improved rotate_backups.load_config_file() documentation.
  • Use humanfriendly.sphinx module to generate documentation.
  • Configured autodoc to order members based on source order.

Some backwards incompatible changes slipped in here, e.g. removing Backup.__init__() and renaming Backup.datetime to Backup.timestamp.

In fact the refactoring that I’ve started here isn’t finished yet, because the separation of concerns between the RotateBackups, Location and Backup classes doesn’t make a lot of sense at the moment and I’d like to improve on this. Rewriting projects takes time though :-(.

Release 2.3 (2015-08-30)

Add/restore Python 3.4 compatibility.

It was always the intention to support Python 3 but a couple of setbacks made it harder than just “flipping the switch” before now :-). This issue was reported here: https://github.com/xolox/python-naturalsort/issues/2.

Release 2.2 (2015-07-19)

Added support for configuration files.

Release 2.1 (2015-07-19)

Bug fix: Guard against empty rotation schemes.

Release 2.0 (2015-07-19)

Backwards incompatible: Implement a new Python API.

The idea is that this restructuring will make it easier to re-use (parts of) the rotate-backups package in my other Python projects..

Release 1.1 (2015-07-19)

Merged pull request #1: Add include/exclude filters.

I made significant changes while merging this (e.g. the short option for the include list and the use of shell patterns using the fnmatch module) and I added tests to verify the behavior of the include/exclude logic.

Release 1.0 (2015-07-19)

  • Started working on a proper test suite.
  • Split the command line interface from the Python API.
  • Prepare for API documentation on Read The Docs.
  • Switch from py_modules=[...] to packages=find_packages() in setup.py.

Release 0.1.2 (2015-07-15)

  • Bug fix for -y, --yearly command line option mapping.
  • Fixed some typos (in the README and a comment in setup.py).

Release 0.1.1 (2014-07-03)

  • Added missing dependency.
  • Removed Sphinx-isms from README (PyPI doesn’t like it, falls back to plain text).

Release 0.1 (2014-07-03)

Initial commit (not very well tested yet).