Add backup prune CLI and update roadmap

This commit is contained in:
thePR0M3TH3AN
2025-05-21 16:19:32 -04:00
parent 886b9d12e7
commit 07693a7925
7 changed files with 128 additions and 19 deletions

View File

@@ -41,7 +41,7 @@ fn main() -> Result<()> {
let cfg = config::Config::load()?; // resolves DB path
match &args.command {
Commands::Init | Commands::Backup | Commands::Restore { .. } => {}
Commands::Init | Commands::Backup(_) | Commands::Restore { .. } => {}
_ => match db::backup(&cfg.db_path) {
Ok(p) => info!("Pre-command auto-backup created at {}", p.display()),
Err(e) => error!("Failed to create pre-command auto-backup: {e}"),
@@ -100,9 +100,8 @@ fn main() -> Result<()> {
Commands::Search { query, exec } => run_search(&conn, &query, exec)?,
/* ---- maintenance ---------------------------------------- */
Commands::Backup => {
let p = db::backup(&cfg.db_path)?;
println!("Backup created: {}", p.display());
Commands::Backup(opts) => {
cli::backup::run(&opts, &cfg.db_path, &mut conn, args.format)?;
}
Commands::Restore { backup_path } => {