Nightly backup tool for Docker Compose stacks and local project directories.
Wraps restic with per-stack stop/start orchestration so SQLite-backed containers get clean snapshots. Writes a primary repo to a local path, then mirrors it to an offsite restic repo via restic copy (SFTP by default).
- Per-stack modes:
stop-start(SQLite-safe downtime),live(no downtime),skip(excluded entirely). - Guaranteed restart: any stack stopped by backer is started again via
defer, even on panic. - Single static Go binary — drop into cron, done.
- Dedup + compression + encryption via restic.
- Selective restore — any path, any snapshot.
- Retention:
--keep-daily 7 --keep-weekly 4 --keep-monthly 6(all from one nightly cron).
- Linux host with Docker Compose v2
restic≥ 0.18 in$PATH- Go ≥ 1.24 to build
git clone https://github.com/code-418dotcom/backer.git
cd backer
go build -o backer ./cmd/backer
mkdir -p ~/.config/backer
openssl rand -base64 48 > ~/.config/backer/repo.pass
chmod 600 ~/.config/backer/repo.pass
# Edit the sample config below and save to ~/.config/backer/config.toml
./backer config check
./backer run --dry-run
./backer run # real runInstall cron:
0 2 * * * PATH=$HOME/.local/bin:$PATH $HOME/bin/backer run
See docs/plan.md for the full schema and design notes.
MIT