Interactive backup and restore CLI for PostgreSQL, MariaDB, and MSSQL.
Project description
fuelrod-backup
Interactive backup and restore CLI for PostgreSQL, MariaDB/MySQL, and Microsoft SQL Server.
Features
- Supports
postgres,mariadb, andmssqlengines - Interactive backup and restore wizards
- Non-interactive backup mode for automation
- Docker and direct-host connection modes
- Config bootstrap wizard (
init) and connection check (test) - Backup retention cleanup (
KEEP_DAYS)
Installation
pip install fuelrod-backup
Or with pipx:
pipx install fuelrod-backup
Quick Start
- Initialize config:
fuelrod-backup init
- Validate connection:
fuelrod-backup test
- Run backup:
fuelrod-backup backup
- Run restore:
fuelrod-backup restore
Documentation
- Configuration Reference
- Architecture and Workflows
- Code Review Notes
- Feature Plan
- Feature Checklist
- Example config:
.backup.example
CLI Commands
fuelrod-backup backup [OPTIONS]
fuelrod-backup restore [OPTIONS]
fuelrod-backup test [OPTIONS]
fuelrod-backup init [OPTIONS]
backup options
--no-interactive, -nskip prompts and back up all databases--compress / --no-compressoverride compression--keep-days, -koverride retention days (0keeps forever)--db, -drepeatable database selector--docker / --no-dockeroverrideUSE_DOCKER--db-type, -tone ofpostgres | mariadb | mssql--config, -cexplicit config file path
restore and test options
--docker / --no-docker--db-type, -t--config, -c
init options
--output, -ooutput path for generated config (default.backup)
Config
Config is loaded in this order:
- defaults in code
- config file (
--configif passed, otherwise auto-discovered) - environment variables (highest priority)
Auto-discovery order
For each directory below, files are checked in this order:
.backup.env.env-backup
Directories searched:
- current working directory
- project directory
- parent repo directory
Main keys
DB_TYPE=postgres|mariadb|mssqlDB_USERNAME,DB_PASSWORD,DB_HOST,DB_PORTUSE_DOCKER=true|falseSERVICE=<container-name>BASE_DIR=<backup-root>COMPRESS_FILE=true|falseKEEP_DAYS=<int>CONNECTION_TIMEOUT=<seconds>
PostgreSQL-specific:
PG_DUMP_CMDPG_RESTORE_CMD
MariaDB-specific:
MYSQL_DUMP_CMDMYSQL_CMD
MSSQL-specific:
MSSQL_BACKUP_DIR
Notes
- Effective backup output directory is
<BASE_DIR>/<DB_TYPE>/.... - PostgreSQL backups use custom format
.dump(optional.gz). - MariaDB backups use
.sql(optional.gzor.zipinput supported on restore). - MSSQL backups use
.bak.
License
GNU General Public License v3.0 or later. See LICENSE.
Breaking Change
Connection variables are now engine-agnostic only:
DB_USERNAMEDB_PASSWORDDB_HOSTDB_PORT
Legacy connection keys (PG_USERNAME, PG_PASSWORD, PG_HOST, PG_PORT) are no longer loaded.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuelrod_backup-2.3.0.tar.gz.
File metadata
- Download URL: fuelrod_backup-2.3.0.tar.gz
- Upload date:
- Size: 51.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.3 CPython/3.14.3 Linux/6.17.0-1008-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
489a77ff2e5a76af61b5c973fc2608e9752724bf4060f6c7cb7f06156c33c6d9
|
|
| MD5 |
ef5c696e356ae141cd024dcc523da52e
|
|
| BLAKE2b-256 |
53a0ada95794308ad4d031a9d3f4521129db459a31729301da42dc658700c66c
|
File details
Details for the file fuelrod_backup-2.3.0-py3-none-any.whl.
File metadata
- Download URL: fuelrod_backup-2.3.0-py3-none-any.whl
- Upload date:
- Size: 61.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.3 CPython/3.14.3 Linux/6.17.0-1008-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6378d37fe8fec629f4603678f579adca08bf1e32589d276158d0aff174c5df3d
|
|
| MD5 |
4cea409dcf00131e342b68ca63b4901a
|
|
| BLAKE2b-256 |
e424a1ae3834693f1af309d2bcec17f0ab5efd30570051c30c9e7fae006e84be
|