Skip to content
BotServBotServ
BackupSelf-HostingData backupContainerResticBorgBackupProxmox

Backup for Self-Hosting

Plan backups for self-hosting setups. Containers, data, configurations and recovery overview.

S

schutzgeist

3 min read
Backup for Self-Hosting

Backups for Self-Hosting

What This Article Covers

  • What data to back up in self-hosted environments.
  • How to protect container data, configurations, and virtual machines.
  • Which tools work best for Linux, Docker, and Proxmox.
  • How to prepare and test recovery procedures.

Introduction: Backups for Self-Hosting

When you run your own services, you own the responsibility for protecting them. Cloud providers typically handle backups automatically. With self-hosting, that responsibility falls on you. A disk failure, misconfiguration, or faulty update can destroy data. A solid backup plan prevents this.

Self-hosting backups need to be selective. You don’t back up everything. Configuration files, container volumes, databases, and virtual machines usually matter most. Large model files can often be re-downloaded if needed.

Why Do You Need Backups for Self-Hosting?

Without backups, data loss means starting from scratch. That could cost hours or days of work. Vector databases, document indices, custom configurations, and Proxmox VMs are particularly time-consuming to rebuild.

A good plan protects both your data and your sanity. If you test restores regularly, you’ll get back online quickly when something breaks.

Self-Hosting Backups at a Glance

Key data sources:

  • Container volumes: Databases, vector stores, user data.
  • Configurations: Docker Compose files, environment variables, Nginx settings, Proxmox configurations.
  • Virtual machines: Proxmox backups or snapshot exports.
  • Documents and uploads: User-uploaded or generated files.
  • Certificates and keys: TLS certificates, API keys, password files.

Lower priority or easily re-obtained:

  • Base models: Can be downloaded again from the internet.
  • Temporary files: Caches, build artifacts.

Who Should Read This?

  • Home server operators.
  • Docker and Proxmox users.
  • Anyone running custom AI and web services.
  • Administrators managing self-hosted infrastructure in production.

Key Backup Concepts

  • Full backup: A complete copy of all relevant data.
  • Incremental: Captures only changes since the last backup.
  • Snapshot: The state of a system at a specific point in time.
  • Retention: How long backups are kept.
  • 3-2-1 rule: Three copies, on two types of media, with one offsite.
  • Offsite: A backup stored at a different physical location.
  • Restore: Recovering data from a backup.

Practical Examples for Self-Hosting Backups

Docker Containers with Restic

Restic encrypts all important Docker volumes and stores them on a NAS or cloud storage. A daily cron job runs the backup automatically.

Proxmox Backups

Virtual machines and LXC containers are regularly backed up to a backup server. When needed, you can restore a snapshot directly through the Proxmox interface.

Git Repository for Configurations

All Docker Compose files, Nginx configurations, and scripts live in a Git repository. Changes are versioned and easy to recover.

Common Pitfalls in Self-Hosting Backups

  • No test restores: A backup you’ve never tested is worthless.
  • Unencrypted backups: External copies should always be encrypted.
  • Bloated backups: Model files and logs eat up storage.
  • No retention policy: Backups grow indefinitely.
  • Only local copies: A fire or hardware failure can destroy all copies at once.
  • Forgotten passwords: You won’t be able to open an encrypted backup without the key.

Further Resources on Self-Hosting Backups

FAQ: Backups for Self-Hosting

Should I back up models? Only custom or self-trained models. Public base models can be re-downloaded.

Where should I store backups? At least two locations, ideally three. An on-site NAS plus an encrypted offsite backup is a solid starting point.

How often should I back up? Daily for configurations and databases. VM snapshots depend on change frequency, weekly or daily.

How long should I keep backups? As long as necessary, as short as practical. Most data needs only days or weeks. Compliance requirements might mandate longer retention.

Do I need backup software? No, but it makes things easier. Restic and BorgBackup are proven open-source options.

References and Further Reading

Summary: Backups for Self-Hosting

Backups are essential in self-hosted environments. Container volumes, configurations, databases, and virtual machines should be backed up regularly. Encrypt your data, store copies in multiple locations, and test restores periodically. Then you’ll recover quickly from outages. Large base models don’t need backing up since you can re-download them anyway.

Back to Blog
Share:

Related Posts