Replicator is a task runner for backups.
You can describe your tasks declarative with YAML file and run task files with CRON.
Replicator supports notifications, it's useful for tasks that take a lot of time.
Install
Install from pip pip install replicator-cli
Or build:
- Clone repository
git clone https://github.com/vitonsky/replicator.git - Build package with run
make build - Install package
pip install dist/replicator-0.0.1-py3-none-any.whl
Usage
usage: replicator [-h] config
Util to replicate backups from primary storage to a mirrors
positional arguments:
config Path to config file
optional arguments:
-h, --help show this help message and exit
To use util, first create task file.
Example task file for a local device
tasks:
# Task may have name
- name: 'Copy files to backup disk'
run: rclone ./backups /path/to/local/mirror1
- name: 'Upload to S3'
run: rclone ./backups s3Replica:backups
- name: 'Replicate on server'
# Just run replicator on server with their own config and end locally
run: ssh replicator@backup-server 'nohup replicator ./backups.yml > ./replicator.log 2>&1 </dev/null &'
Example task file for backup server
# Notifications config
notifications:
telegram:
# Define should notifications been sent
enabled: true
# Token for bot who will sent notifications
# How to: https://core.telegram.org/bots/tutorial#getting-ready
botToken: '123:token'
# User IDs to receive notifications
userIds:
- 123456
# Replicate backup from main storage
tasks:
- run: rclone s3Replica:backups s3Mirror1:backups
- run: rclone s3Replica:backups s3Mirror2:backups
- run: rclone s3Replica:backups s3Mirror3:backups
TODO
- Support few entries for replication
- Provide commands to run, instead of paths
- Provide instructions to install as binary
- Split the code
- Add docker image
Metadata
Release files for replicator-cli 0.0.7
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 |
|---|---|---|---|---|
| replicator-cli-0.0.7.tar.gz | 4.7 kB | Without provenance | Details for replicator-cli-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| replicator_cli-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for replicator_cli-0.0.7-py3-none-any.whl |
Total release size: 10.1 kB
Release files / replicator-cli-0.0.7.tar.gz
| Download URL | replicator-cli-0.0.7.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5d471b3221cd0331c6285fad5d6f7d93d2b4b409e8b0105e56adfc895115c8f
|
|
BLAKE2b-256 checksum How to use checksums |
e001cee511eb1a5e4138669078f1eb098776fda3e8aaaf4a2b06c7f4a2cb9894
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / replicator_cli-0.0.7-py3-none-any.whl
| Download URL | replicator_cli-0.0.7-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861dda74f32ace796a181cab27d7b893f8db690ecf137a6d952f45bb2a8bd70d
|
|
BLAKE2b-256 checksum How to use checksums |
a162a62c16f6befd4d5ffce91473ab19e5b2fb6016e0e4e36f48ada23442a86a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for replicator-cli 0.0.7
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.