Backups

Database backups
on a schedule

Pick a schedule and how many to keep. Slasha dumps your database to the server's disk, your S3-compatible bucket, or both, and deletes old ones.

db· PostgreSQL 17 · BackupsUTC

Schedule

cron 0 0 * * *

Keep

7

Destinations

Next runs

    How it works

    How to set up backups

    A few minutes, once per database.

    01

    Add a bucket

    An admin adds S3-compatible storage in Settings and tests the connection. Every app can then use it.

    r2-backups · auto · force path style

    02

    Choose a schedule

    On the database’s Backups tab, pick a preset or a cron expression, a timezone and how many to keep.

    0 3 * * *  ·  Europe/Berlin  ·  keep 14

    03

    Restore when you need to

    Download a backup or restore it into the running database, from the dashboard or the terminal.

    slasha services backups db restore

    Backups tab

    See every backup in one list

    The Backups tab shows the schedule, where backups go and every run. Click Backup now before a risky migration.

    • Formats: .dmp for Postgres, .sql for MySQL, .archive for MongoDB
    • Download, restore or delete from the same row
    Database backups
    AppsstorefrontServicesdb
    dbPostgreSQL 17Running
    Daily at midnight· UTC · keep 7Localr2-backupsBackup now
    Today, 00:0048.2 MB
    Yesterday, 00:0047.9 MB
    Oct 30, 16:1247.6 MB
    Oct 30, 00:0047.5 MB
    Oct 29, 00:0047.1 MB

    Destinations

    Store backups in your own bucket

    Use any S3-compatible storage: Cloudflare R2, Backblaze B2, AWS S3 or MinIO. Keep a local copy for faster restores, or only the off-site one.

    • Local disk, a bucket, or both
    • Credentials are encrypted with your server key
    • Admins add storages. Each database picks one
    Configure storage
    Settings → S3 Storages → New
    Connection OK

    Cloudflare R2 · Backblaze B2 · AWS S3 · MinIO · any S3 API

    From the terminal

    Download a backup from the terminal

    List, take, download and restore backups from the CLI. Downloads get the latest by default and write to stdout when piped.

    • trigger takes a backup right now
    • restore and delete ask first unless you pass -y
    • You set the schedule in the dashboard
    Backup commands
    ~/storefront

    ❯ slasha services backups db list

    NAME                    STATUS     SIZE
    db-20261101000000.dmp   Succeeded  48.2 MB
    db-20261031161204.dmp   Succeeded  47.6 MB
    db-20261031000000.dmp   Succeeded  47.5 MB

    ❯ slasha services backups db download -f latest.dmp

    Downloading db-20261101000000.dmp (48.2 MB)...

    SUCCESS: 48.2 MB written to latest.dmp

    ❯ pg_restore -d storefront_dev latest.dmp

    SQLite apps

    Back up SQLite as it changes

    If your app keeps its data in a SQLite file, turn on SQLite backups and Slasha runs Litestream next to it. Each change is copied to your bucket as it happens.

    • Set the file path, for example /data/app.db
    • Slasha switches the database to WAL mode for you
    • “Restore latest” restores the copy on the next deploy
    • Needs a single web instance, so Litestream is the only writer
    Persistent storage
    storefront · Settings → Backups

    Database path

    /data/app.db

    Storage

    r2-backups

    Path prefix

    storefront/

    Replicating · from web.0Restore latest

    Dashboard only for now.

    More details

    Seven presets

    From hourly to monthly, or any cron expression.

    Timezones

    Run at 3 AM in your users’ timezone.

    Keep N

    Old backups are deleted from disk and bucket.

    Backup now

    Take a backup before a risky change.

    Download

    From the dashboard or the CLI.

    Restore in place

    Load a backup back into the running database.

    Any S3 API

    R2, B2, AWS or MinIO, with a connection test.

    Redis persistence

    Not backed up, but Redis saves its data to its volume.

    Questions about backups

    Have another question? Ask on GitHub.

    Which databases are backed up?
    PostgreSQL (pg_dump, custom format), MySQL (mysqldump) and MongoDB (mongodump, gzip archive). Redis isn’t. It saves its data to its own volume (append-only file), so the data survives restarts, but Slasha doesn’t take scheduled Redis dumps.
    Do I need S3 to use backups?
    No. Backups can stay on the server’s local disk only. We still recommend adding a bucket. A backup on the same disk as the database won’t help if you lose the server.
    How does retention work?
    You choose how many successful backups to keep. After each new backup succeeds, Slasha deletes the oldest ones over that number, from local disk and from the bucket. Failed backups don’t count, so they never cause a good one to be deleted.
    What does a restore do?
    It loads the dump back into the running database, replacing what’s there. For PostgreSQL that’s pg_restore --clean --if-exists. A restore overwrites your data, so the CLI asks you to confirm unless you pass -y. See Backups.
    My app uses SQLite. Is it covered?
    Yes, but it works differently. Turn on SQLite backups in the app’s settings and Litestream copies every change to your bucket as it happens. There’s no schedule. You can restore the latest copy on the next deploy. You set this up in the dashboard.
    Can I set the schedule from the CLI?
    Not yet. Schedule, retention and destinations are set in the dashboard. The CLI can list, trigger, download, restore and delete backups, and slasha services backups db config prints the current settings.

    Other features

    All features

    Back up your databases to your own bucket

    Scheduled backups in a few minutes. Free, on your own server.

    $curl -fsSL https://slasha.com/setup.sh | bash