Metadata-Version: 2.4
Name: backuprotation
Version: 0.0.1
Summary: A tool for rotating backups
Author-email: bluePlatinum <jukic.rok@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/bluePlatinum/backuprotation
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

Backuprotation
==============

A minimalistic python tool which allows you to easily rotate your backups, whether they are a directory or files.


## Installation

`backuprotation` is available through `pip`

```shell
pip install backuprotation
```

## Usage

To rotate your backups which are stored in `./path` simply run

```shell
backuprotation ./path
```
and `backuprotation` will look through `./path` and keep the last ten directories while deleting the rest.

You can specify the amount of backups to keep with `-n` or `--number`
```shell
backuprotation -n 20 ./path
```

By default `backuprotation` looks for directories but it can also rotate files or both files and directories
```shell
backuprotation -f ./path        # files
backuprotation -fd ./path       # files and directories
```

If you're ever unsure of what effects `backuprotation` will have you can perform a dry-run to verify.
```shell
backuprotation --dry-run ./path
```
This will print out the changes that `backuprotation` would perform without actually changing the filesystem.
