{ "info": { "author": "Salton Massally", "author_email": "salton.massally@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Backup", "Topic :: System :: Systems Administration" ], "description": "rotate-backups-s3: Simple command line interface for S3 backup rotation\n=======================================================================\n\nCommandline utility to rotate backup files stored in AWS S3.\nBased on the excellent work of https://github.com/xolox/python-rotate-backups\n\n.. contents::\n :local:\n\nFeatures\n--------\n \n\n**Flexible rotation**\n Rotation with any combination of hourly, daily, weekly, monthly and yearly\n retention periods.\n\n**Fuzzy timestamp matching in filenames**\n The modification times of the files and/or directories are not relevant. If\n you speak Python regular expressions, here is how the fuzzy matching\n works::\n\n # Required components.\n (?P\\d{4}) \\D?\n (?P\\d{2}) \\D?\n (?P\\d{2}) \\D?\n (\n # Optional components.\n (?P\\d{2}) \\D?\n (?P\\d{2}) \\D?\n (?P\\d{2})?\n )?\n\n**All actions are logged**\n Log messages are saved to the system log (e.g. ``/var/log/syslog``) so you\n can retrace what happened when something seems to have gone wrong.\n\nInstallation\n------------\n\nThe `rotate-backups-s3` package is available on PyPI_ which means installation\nshould be as simple as:\n\n.. code-block:: sh\n\n $ pip install rotate-backups-s3\n\n\nUsage\n-----\n\nThere are two ways to use the `rotate-backups-s3` package: As the command line\nprogram ``rotate-backups-s3`` and as a Python API\nThe command line interface is described below.\n\nCommand line\n~~~~~~~~~~~~\n\n.. A DRY solution to avoid duplication of the `rotate-backups-s3 --help' text:\n..\n.. [[[cog\n.. from humanfriendly.usage import inject_usage\n.. inject_usage('rotate_backups.cli')\n.. ]]]\n\n**Usage:** `rotate-backups [OPTIONS] DIRECTORY..`\n\nEasy rotation of backups based on the Python package by the same name. To use this program you specify a rotation scheme via (a combination of) the ``--hourly``, ``--daily``, ``--weekly``, ``--monthly`` and/or ``--yearly`` options and specify the directory (or multiple directories) containing backups to rotate as one or more positional arguments.\n\nInstead of specifying directories and a rotation scheme on the command line you can also add them to a configuration file.\n\nPlease use the ``--dry-run`` option to test the effect of the specified rotation scheme before letting this program loose on your precious backups! If you don't test the results using the dry run mode and this program eats more backups than intended you have no right to complain ;-).\n\n**Supported options:**\n\n.. csv-table::\n :header: Option, Description\n :widths: 30, 70\n\n\n \"``-U``, ``--aws-access-key-id=xxxxxx``\",\"Set the number of daily backups to preserve during rotation. Refer to the\n usage of the ``-H``, ``--hourly`` option for details.\"\n \"``-P``, ``--aws-secret-access-key=xxxxxx``\",\"AWS S3 secret key.\"\n \"``-H``, ``--hourly=COUNT``\",\"Set the number of hourly backups to preserve during rotation:\n \n - If ``COUNT`` is an integer it gives the number of hourly backups to preserve,\n starting from the most recent hourly backup and counting back in time.\n - You can also pass \"\"always\"\" for ``COUNT``, in this case all hourly backups are\n preserved.\n - By default no hourly backups are preserved.\"\n \"``-d``, ``--daily=COUNT``\",\"Set the number of daily backups to preserve during rotation. Refer to the\n usage of the ``-H``, ``--hourly`` option for details.\"\n \"``-w``, ``--weekly=COUNT``\",\"Set the number of weekly backups to preserve during rotation. Refer to the\n usage of the ``-H``, ``--hourly`` option for details.\"\n \"``-m``, ``--monthly=COUNT``\",\"Set the number of monthly backups to preserve during rotation. Refer to the\n usage of the ``-H``, ``--hourly`` option for details.\"\n \"``-y``, ``--yearly=COUNT``\",\"Set the number of yearly backups to preserve during rotation. Refer to the\n usage of the ``-H``, ``--hourly`` option for details.\"\n \"``-I``, ``--include=PATTERN``\",\"Only process backups that match the shell pattern given by ``PATTERN``. This\n argument can be repeated. Make sure to quote ``PATTERN`` so the shell doesn't\n expand the pattern before it's received by rotate-backups.\"\n \"``-x``, ``--exclude=PATTERN``\",\"Don't process backups that match the shell pattern given by ``PATTERN``. This\n argument can be repeated. Make sure to quote ``PATTERN`` so the shell doesn't\n expand the pattern before it's received by rotate-backups.\"\n \"``-c``, ``--config=PATH``\",\"Load configuration from the pathname given by ``PATH``. If this option isn't\n given two default locations are checked: \"\"~/.rotate-backups.ini\"\" and\n \"\"/etc/rotate-backups.ini\"\". The first of these two configuration files to\n exist is loaded. For more details refer to the online documentation.\"\n \"``-n``, ``--dry-run``\",\"Don't make any changes, just print what would be done. This makes it easy\n to evaluate the impact of a rotation scheme without losing any backups.\"\n \"``-v``, ``--verbose``\",Make more noise (increase logging verbosity).\n \"``-h``, ``--help``\",\"Show this message and exit.\n \"\n\n.. [[[end]]]\n\nConfiguration files\n~~~~~~~~~~~~~~~~~~~\n\nInstead of specifying directories and rotation schemes on the command line you\ncan also add them to a configuration file.\n\nBy default two locations are checked for a configuration file, these are\n``~/.rotate-backups-s3.ini`` and ``/etc/rotate-backups-s3.ini``. The first of these\nthat exists is loaded. You can load a configuration file in a nonstandard\nlocation using the command line option ``--config``.\n\nConfiguration files use the familiar INI syntax. Each section defines a\ndirectory that contains backups to be rotated. The options in each section\ndefine the rotation scheme and other options. Here's an example\n\n.. code-block:: ini\n\n # /etc/rotate-backups-s3.ini:\n # Configuration file for the rotate-backups program that specifies\n # buckets containing backups to be rotated according to specific\n # rotation schemes.\n\n [laptop]\n hourly = 24\n daily = 7\n weekly = 4\n monthly = 12\n yearly = always\n\n [server]\n daily = 7\n weekly = 4\n monthly = 12\n yearly = always\n\n [mopidy]\n daily = 7\n weekly = 4\n monthly = 2\n\n [xbmc]\n daily = 7\n weekly = 4\n monthly = 2", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tarzan0820/python-rotate-backups-s3", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "rotate-backups-s3", "package_url": "https://pypi.org/project/rotate-backups-s3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rotate-backups-s3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tarzan0820/python-rotate-backups-s3" }, "release_url": "https://pypi.org/project/rotate-backups-s3/0.3/", "requires_dist": null, "requires_python": null, "summary": "Simple command line interface for S3 backup rotation", "version": "0.3" }, "last_serial": 2452366, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "257e04936f148585932e8a4c76f5fbe4", "sha256": "b64dde439846c24438aa17f89745ad428847a5a8b00e46b26ccb147d49330b4f" }, "downloads": -1, "filename": "rotate-backups-s3-0.1.tar.gz", "has_sig": false, "md5_digest": "257e04936f148585932e8a4c76f5fbe4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9911, "upload_time": "2016-03-24T18:49:15", "url": "https://files.pythonhosted.org/packages/b3/a2/dbb9762059ae45d54fdc546c570d0dd3b18cc3d0e1a676ed22bcfc0e25f2/rotate-backups-s3-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ddb5f8c6855e57c6a71eed426e2e821d", "sha256": "54fd47b2ede5d29d8cb2a0dc93228ae84fb60af3e2bd87c8fdb4ffa9aa2976a0" }, "downloads": -1, "filename": "rotate-backups-s3-0.2.tar.gz", "has_sig": false, "md5_digest": "ddb5f8c6855e57c6a71eed426e2e821d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9925, "upload_time": "2016-11-08T21:07:31", "url": "https://files.pythonhosted.org/packages/a2/67/bc917a5917f6237f25c8457c07f29eef3db99fade290cb92cbcc37b30086/rotate-backups-s3-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7a4851c7f5a1d820c3fb78424655fccf", "sha256": "b5be4294a82d9b8619a60d17feca41142c617510fc13ea2e9ba2800c347d02ef" }, "downloads": -1, "filename": "rotate-backups-s3-0.3.tar.gz", "has_sig": false, "md5_digest": "7a4851c7f5a1d820c3fb78424655fccf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9900, "upload_time": "2016-11-10T04:23:49", "url": "https://files.pythonhosted.org/packages/38/8f/efd53f90cf70ef5e5ab84def41fca999a7a723a0e75e68af94ce92473cf0/rotate-backups-s3-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a4851c7f5a1d820c3fb78424655fccf", "sha256": "b5be4294a82d9b8619a60d17feca41142c617510fc13ea2e9ba2800c347d02ef" }, "downloads": -1, "filename": "rotate-backups-s3-0.3.tar.gz", "has_sig": false, "md5_digest": "7a4851c7f5a1d820c3fb78424655fccf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9900, "upload_time": "2016-11-10T04:23:49", "url": "https://files.pythonhosted.org/packages/38/8f/efd53f90cf70ef5e5ab84def41fca999a7a723a0e75e68af94ce92473cf0/rotate-backups-s3-0.3.tar.gz" } ] }