The goal of the project is to simplify backup creation.
Project description
Backup Utils
The goal of this project is to create a front to backup program like Borg. Indeed, Borg is a really great tool for backup, but I always write a bash script to specify directories I want to save. I also use Rclone to synchronize my backup to a remote. And finally I need to backup my database.
There are three steps to backup :
- Database export
- Archiving
- Synchronize
For each step, you can use multiple driver define in the DatabaseTask.py
or Task.py
.
Also if something go wrong, all Exceptions are catch to send a notification.
By default, database export use mysql, archiving borg, and synchronize rclone.
1. Installation
You can use pip
pip install backup-utils
You can build the project yourself:
git clone https://gitlab.com/Oprax/backup-utils.git
cd backup-utils
make build # will produce a `dist/backup_utils.pyz` file
2. Usage
There are two commands. The first one is for is for add directory to configuration file which would be backup is the next time.
backup-utils -d /an/absolute/path -d ./a/relative/path
backup-utils --dir ~/user/path
It is usefull because this command will resolve the path for to have an absolute path.
Ths seconds command is the command to run a backup :
backup-utils --run # the long one
backup-utils -r # the shortcut
backup-utils # `run` is the default command if there are no argument
3. Configuration
The configuration file is a JSON file store in ~/.config/bak-utils/config.json
.
You can see config.example.json
to have an example.
Root object:
directories
: A list of directories to backup, please use--dir
command to add a new directory.repo
: The directory containing the backup and that will be synchronize to a remote server.
For backup
, sync
and database
object, the most important is the driver
key.
The other params is depending the driver.
backup
driver supported:
borg
sync
driver supported:
rclone
database
driver supported:
mysql
If there is no database
key in the config file, this task will be skipped.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for backup_utils-0.6.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59bc994a983e58ebe435304e0e7baa11723da821df9ffb0fc74c7f98389f87a |
|
MD5 | bc24a6b7fd22a6327f83cc9b3de77183 |
|
BLAKE2b-256 | 442928bf3b7db0104a0cf5800122bdd972dcfdb055902ea014a0876b6f69cbbd |