Back to Blog
team@tinypod.app

How to Back Up Your Self-Hosted Services

Backups are the most important part of self-hosting. Here's how to back up databases, files, and configurations reliably.

backupsdisaster-recoveryself-hostingguide

The 3-2-1 Rule


  • 3 copies of your data
  • 2 different storage types
  • 1 offsite copy

  • Self-hosting without backups is worse than using a cloud service. Cloud providers have redundancy; you have a single server.


    What to Back Up


    Databases

  • PostgreSQL: pg_dump
  • MySQL/MariaDB: mysqldump
  • SQLite: cp the file (while app is stopped) or .backup command
  • Redis: RDB snapshots

  • Application Data

  • Docker/Podman volumes
  • Uploaded files and media
  • Configuration files

  • System Configuration

  • Reverse proxy configs
  • Systemd service files
  • Environment files
  • Crontabs

  • Backup Tools


    Restic

  • Encrypted, deduplicated backups
  • Supports S3, SFTP, local, and more
  • Incremental (only backs up changes)
  • Fast restores

  • Borgmatic

  • Wrapper around BorgBackup
  • YAML configuration
  • Automatic retention policies
  • Monitoring hooks

  • Offsite Storage Options


  • Backblaze B2 ($6/TB/month)
  • Wasabi ($7/TB/month, no egress fees)
  • Another VPS via SFTP
  • Hetzner Storage Box

  • Automation


    1. Create backup script

    2. Schedule with cron (daily databases, weekly full)

    3. Set up monitoring (alert if backup fails)

    4. Test restores monthly


    Testing Restores


    A backup you haven't tested isn't a backup. Monthly: pick a random service and restore it on a test server.


    Deployment


    TinyPod handles backups for your pods. But understanding the principles helps you verify your data is safe.