gitwtfhub

wtf is kamal-backup?

crmne/kamal-backup — explained in plain English

Analysis updated 2026-05-18

79RubyAudience · ops devopsComplexity · 3/5Setup · moderate

TL;DR

A Ruby gem that adds scheduled, encrypted database and file backups to Rails apps deployed with the Kamal deployment tool.

Mindmap

mindmap
  root((kamal-backup))
    What it does
      Scheduled backups
      Encrypted snapshots
      Restore drills
    Tech stack
      Ruby
      Kamal
      restic
    Use cases
      Back up databases
      Back up uploaded files
      Test restores
    Audience
      Self-hosted Rails devs

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add automated, scheduled backups of PostgreSQL, MySQL, or SQLite to a self-hosted Rails app

REASON 2

Back up files uploaded through Rails Active Storage alongside the database

REASON 3

Store encrypted, deduplicated backup snapshots in S3-compatible storage via restic

REASON 4

Run restore drills and generate JSON evidence of backup status for security reviews

What's in the stack?

RubyKamalresticDocker

How it stacks up

crmne/kamal-backupmitchellh/net-ssh-shelldhh/conductor
Stars797974
LanguageRubyRubyRuby
Last pushed2015-03-272010-09-16
MaintenanceDormantDormant
Setup difficultymoderateeasymoderate
Complexity3/52/52/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a Kamal-deployed Rails app and S3-compatible (or restic REST) storage to hold snapshots.

License is not specified in the description.

Wtf does this do

Kamal-backup is a Ruby gem that adds automated, scheduled database and file backups to Rails web applications deployed with Kamal. Kamal is a deployment tool that uses Docker containers on your own servers rather than a managed cloud platform, and kamal-backup plugs into that system as what Kamal calls an "accessory", an add-on container that runs alongside your main application. The problem it solves is that self-hosted Rails apps typically need recurring backups of their PostgreSQL, MySQL/MariaDB, or SQLite database, plus any files uploaded through Rails Active Storage (the built-in file attachment system), but setting this up properly is often a separate operations project. Kamal-backup makes it a one-config addition. Under the hood it uses restic, a backup tool that produces encrypted and deduplicated snapshots stored in S3-compatible object storage, a restic REST server, or a local filesystem location. Deduplication means only the changes since the last backup are stored, saving storage space. You configure a schedule in seconds, point it at your database and storage paths, and the container handles the rest automatically. It also includes restore drills, test restores to verify your backups actually work, and a command to generate JSON evidence of backup status for security reviews. A developer running a self-hosted Rails app with Kamal who wants reliable, encrypted, automated backups without building a separate backup system would use this.

Yoink these prompts

Prompt 1
Help me add crmne's kamal-backup accessory to my Rails app's Kamal deploy config
Prompt 2
Explain how restic deduplication keeps backup storage costs down in kamal-backup
Prompt 3
Show me how to schedule automated backups and configure S3-compatible storage for this gem
Prompt 4
Walk me through running a restore drill with kamal-backup to verify my backups work

Frequently asked questions

wtf is kamal-backup?

A Ruby gem that adds scheduled, encrypted database and file backups to Rails apps deployed with the Kamal deployment tool.

What language is kamal-backup written in?

Mainly Ruby. The stack also includes Ruby, Kamal, restic.

What license does kamal-backup use?

License is not specified in the description.

How hard is kamal-backup to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is kamal-backup for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.