Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jan 3, 2025
1 parent cc1c640 commit 5603b72
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 8 deletions.
57 changes: 55 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ repository = "https://github.com/Clivern/Pentheus"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = "4.5.2"
home = "0.5.9"
inquire = "0.7.0"
serde = "1.0.195"
serde_json = "1.0.114"
serde_with = "3.6.0"
clap = "4.5.23"
home = "0.5.11"
inquire = "0.7.5"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.134"
serde_with = "3.12.0"
toml = "0.8.19"

[profile.release]
opt-level = "z" # Optimize for size.
Expand Down
48 changes: 48 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Database backups
[database]
[database.sqlite_db_01]
driver = "sqlite"
path = "/opt/backup/app1-db.sqlite"

[database.my_mysql_db_01]
driver = "mysql"
host = "mysql_host"
port = 3306
user = "mysql_user"
password = "mysql_password"
database = "my_mysql_db"

[database.my_postgres_db_01]
driver = "postgres"
host = "postgres_host"
port = 5432
user = "postgres"
password = "postgres_password"
database = "my_postgres_db"

# Backup storage
[storage]
[storage.local_store]
driver = "local"
path = "/path/to/local/backup"
compress = "zip"

[storage.s3_store]
driver = "s3"
bucket = "my-backup-bucket"
region = "us-east-1"
access_key = "my_access_key"
secret_key = "my_secret_key"
compress = "none"

# Cron Jobs
[cron]
[cron.sqlite_db_01_cron]
schedule = "5 4 * * *"
database = "sqlite_db_01"
storage = "local_store"

# Backups state file
[state]
storage = "s3_store"
path = "/state.json"
Loading

0 comments on commit 5603b72

Please sign in to comment.