Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backer

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).

Features

  • 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).

Requirements

  • Linux host with Docker Compose v2
  • restic ≥ 0.18 in $PATH
  • Go ≥ 1.24 to build

Quick start

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 run

Install cron:

0 2 * * * PATH=$HOME/.local/bin:$PATH $HOME/bin/backer run

Configuration

See docs/plan.md for the full schema and design notes.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages