-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename variable and update documentation.
- Loading branch information
1 parent
1df2cdb
commit 0dd2e4c
Showing
2 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# docker-rotate-backups | ||
This repository provides a Docker image that implements [`rotate-backups`](https://pypi.org/project/rotate-backups/). | ||
|
||
Using this image you are enabled to instantiate container that runs rotate-backups once on a mounted directory where your backups are stored. Afterwards, the container is stopped and, if desired, removed. | ||
By using this image, you are enabled to instantiate a container that runs rotate-backups once on a mounted directory. In the mounted directory, irrelevant backups are removed and useful are preserved. Afterwards, the container is stopped and, if desired, removed. | ||
|
||
## How to use | ||
Simply adapt the directory to mount and run the following command in your Docker host: | ||
Simply adapt the directory to mount and run the following command on your Docker host: | ||
``` | ||
docker run --rm \ | ||
-v /path/to/backups:/archive \ | ||
ghcr.io/jan-brinkmann/docker-rotate-backups | ||
``` | ||
The default schema to preserve and to remove backups is `--daily=7 --weekly=4 --monthly=12 --yearly=always --dry-run`. | ||
The default scheme to preserve and to remove backups is `--daily=7 --weekly=4 --monthly=12 --yearly=always --dry-run`. | ||
|
||
## How to customize | ||
The schema can be customized by means of `ROTATE_BACKUPS_CONFIG`: | ||
The scheme can be customized by means of `ROTATION_SCHEME`: | ||
``` | ||
docker run --rm \ | ||
-e ROTATE_BACKUPS_CONFIG="--daily=7 --weekly=4 --monthly=6" \ | ||
-e ROTATION_SCHEME="--daily=7 --weekly=4 --monthly=6" \ | ||
-v /path/to/backups:/archive \ | ||
ghcr.io/jan-brinkmann/docker-rotate-backups | ||
``` | ||
For more information on the synthax and the option of the schema, we refer to the [official `rotate-backups` documentation](https://pypi.org/project/rotate-backups/#command-line). | ||
For more information on the synthax and the options, we refer to the [official `rotate-backups` documentation](https://pypi.org/project/rotate-backups/#command-line). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters