DEV Community

Cover image for 📦 repository_backup: A DevOps-Friendly CLI for Safe, Modular Backups
raymonepping
raymonepping

Posted on

📦 repository_backup: A DevOps-Friendly CLI for Safe, Modular Backups

What started as a simple safety net is now a deeply integrated DevOps CLI:

  • Modular
  • Self-documenting
  • Format-aware
  • Homebrew-packaged

And—thanks to recent updates—even easier for everyone to use

⚡️ Why This Tool Exists

I was tired of backup scripts that were either too basic, too fragile, or never quite “safe.”

  • I wanted real dryrun support
  • I wanted declarative config — in HCL, YAML, or JSON
  • I wanted proper summaries, Git tagging, and backups I could trust

So, I built a Bash CLI that covers all this—and keeps evolving.

🚀 What’s New In This Release?

  1. Output Directory Control Specify exactly where your backups are stored with --output-dir:
repository_backup --target ./my_project --output-dir ./my_backups
Enter fullscreen mode Exit fullscreen mode

No more rigid folder structure—use any path, and organize backups however you like.

  1. Built-in Interactive Wizard Run the CLI without arguments to launch a context-aware wizard:
repository_backup
Enter fullscreen mode Exit fullscreen mode

The wizard walks you through backup, restore, list, prune, and summary actions—adapting prompts for clarity, so you can’t get lost.

🛡️ Quickstart

Install via Homebrew:

brew tap raymonepping/repository-backup-cli
brew install raymonepping/repository-backup-cli/repository-backup-cli
Enter fullscreen mode Exit fullscreen mode

Create your first backup:

repository_backup --target ./your_project_folder
Enter fullscreen mode Exit fullscreen mode

Or, for full guidance, just type:

repository_backup
Enter fullscreen mode Exit fullscreen mode

Restore the latest backup (with dryrun safety):

repository_backup --target ./your_project_folder --restore-latest --dryrun

Enter fullscreen mode Exit fullscreen mode

Edit what gets backed up:
The CLI auto-generates a .backup.hcl, .backup.yaml, or .backup.json—based on what you have installed (hclq, yq, etc). Just tweak it to your needs.

View summary logs:

Clean Markdown summaries are auto-written to
./backups/catalogs//backup_summary.md

đź§  What Makes This CLI Different

Declarative config: HCL/YAML/JSON—fits your stack, not the other way around

Full dryrun support: see exactly what will happen, every time

Safe pruning: manage retention, keep your backup folders clean

Git-aware: tags every backup, supports emergency restores from latest tag

MD5 integrity checks: verifies your restores—so you’re never guessing

đź’ˇ Example Use Cases

Keep your projects (or your CLI scripts) safe, versioned, and recoverable

Back up and restore with confidence—no more “restore roulette”

Use the wizard for foolproof operation, or stick to CLI flags for automation

🛠️ Under the Hood

Modular design with smart bootstrapping: creates config/folders on the fly

Markdown summaries for every backup

One-liner DevOps workflows: backup, commit, and version in a single go

🍺 Production-Ready & Open

Install via Homebrew, or explore/fork/contribute on GitHub:
github.com/raymonepping/homebrew-repository-backup-cli

Backups shouldn’t be risky. With repository_backup, they aren’t. Try the wizard or CLI today and automate your peace of mind!

Top comments (0)