Archive Manager
Manage files in directories in a backup root directory. It will ensure the total size of all the files in the directories are less than a maximum size, but will always keep the minimum number of files. Once the total size is ensured, it will then delete files until the maximum number of files exist.
The assumption is that some other process, such as a backup script, is generating "archives" in a directory or directories. archive-manager will help to manage those files to ensure that there is always room for the most recent backup file.
Requirements
- This will probably only run on Linux
Installation
Future releases will include installation via pip and RPM.
virtualenv archive-manager-venv
. archive-manager-venv/bin/activate
pip install archive-manager
Now that it's installed, the archive-manager command should be available.
$ which archive-manager
<venv>/bin/archive-manager
Usage
By default archive-manager looks for its config file in /etc/archive-manager/config.yml. It does not require any options to run, and can simply be executed by archive-manager.
Options:
$ archive-manager --help
Usage: archive-manager [OPTIONS] COMMAND [ARGS]...
Manage size and number of files in a set of directories
Options:
-c, --config TEXT Config file location
-v, --verbose Set to verbose mode
--help Show this message and exit.
Configuration File
There is an example configuration file in this repository. All of the options in the example file are required.
mkdir /etc/archive-manager
cp config.yaml.example /etc/archive-manager/config.yml
vi /etc/archive-manager/config.yml #edit file to suit requirements
Test
Unit Tests
make test will run the available unit tests.
Metadata
Release files for archive-manager 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archive-manager-0.2.0.tar.gz | 6.6 kB | Without provenance | Details for archive-manager-0.2.0.tar.gz |
Release files / archive-manager-0.2.0.tar.gz
| Download URL | archive-manager-0.2.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3da86f965858183bc4dd45b9795ada7eddc69418d590092c77d257c9af5ac8cf
|
|
BLAKE2b-256 checksum How to use checksums |
5dd7e836ef6f539b8cbfc4e6ba8d8bbd4ba1532628f5bff105201cd8f2488a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15
|
Security for archive-manager 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.