Back up Home Assistant offsite with restic

Updated November 2026

Push Home Assistant backups offsite with restic: encrypted, automated, and recoverable from anywhere.

On this page

Two approaches depending on your HA install

  • Home Assistant OS / Supervised:Use the built-in backup feature to create .tar files, then push those files offsite with restic from the host.
  • Home Assistant Docker / Core:Back up the config directory directly with restic, plus a separate database dump if you use an external DB.
Running Home Assistant OS as a VM on Proxmox? Back up the whole VM to a Proxmox Backup Server datastore.
Ours adds to Proxmox VE as a normal PBS storage, with a token that can write and read backups but cannot delete them: PBS-100 $3/mo for 100 GB, or $30 a year with yearly billing. 30-day money-back on every paid plan. For the restic steps on this page, our Starter vault is zero-knowledge and the same price.
Choose PBS-100, 100 GB

Option A: Back up the HA backup files (HA OS / Supervised)

HA OS stores backups in /backup/ on the host. On a Proxmox LXC or VM, SSH in and back up that directory.

Shell
#!/bin/bash
source /etc/restic/env

# HA stores backups here
restic backup /backup \
  --tag homeassistant \
  --exclude="*.tmp"

Retention runs with your cleanup key from one trusted machine, never from the hosts you back up. See retention on ServerCrate vaults.

Option B: Back up the config directory directly (Docker / Core)

Shell
#!/bin/bash
source /etc/restic/env

# Stop HA for a clean config backup (optional but recommended)
# docker stop homeassistant

restic backup /opt/homeassistant/config \
  --tag ha-config \
  --exclude="*/home-assistant.log" \
  --exclude="*/.storage/lovelace*"  # optional: skip UI cache

# docker start homeassistant

Automate with systemd timer

Wire the script to a systemd timer for nightly backup. See the systemd timer setup guide for complete unit files. The key setting is After=network-online.target so the backup waits for network before starting.

Triggering a HA backup before the restic run

For a clean snapshot, trigger a HA backup via the API before running restic:

Shell
#!/bin/bash
HA_TOKEN="your-long-lived-access-token"
HA_URL="http://homeassistant.local:8123"

# Trigger backup
curl -s -X POST "$HA_URL/api/services/backup/create" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -H "Content-Type: application/json"

# Wait for it to complete
sleep 60

# Now run restic
source /etc/restic/env
restic backup /backup --tag ha-auto

Why Home Assistant backups need to be offsite

Home Assistant usually runs on a Raspberry Pi, mini PC or x86 box, and its SD card or disk is a single point of failure. SD cards fail often under HA's constant writes; without an offsite copy, you rebuild every automation and integration from scratch.

The HA backup holds your configuration, integrations, Lovelace dashboards, scripts, automations, blueprints and optionally history, so a restore takes minutes instead of days of rebuilding.

Home Assistant backup retention

For offsite backup via restic, a sensible retention policy keeps the last 7 daily and 4 weekly backups. HA .tar files range from 100 MB to several GB depending on history, so 7 days fits within the ServerCrate Starter plan.

To keep backups small, turn off "Home Assistant" history in the backup settings and rely on the recorder database for recent history. A config-only backup is typically under 100 MB, and it is the part that matters most.

Verifying your Home Assistant restore works

Test your restore on a spare Pi or in a VM before you need it. In HA OS: boot to onboarding, select Restore Backup and point it at your .tar file.

Repeat it every few months; it takes under 30 minutes.

Next step: connect your first machine

The setup guide takes a new vault from signup to a first encrypted backup and a test restore, with the commands for Linux, macOS and Windows. On a Linux server the one-line installer does it in a single command.

PBS-100 fits one Proxmox host and a handful of guests.
PBS-100 $3/mo for 100 GB, or $30 a year with yearly billing. 30-day money-back on every paid plan.
Choose PBS-100, 100 GB

Home Assistant backup questions

On HA OS and Supervised installs, backups are in /backup/ on the host. On Docker installs, the config directory is at whatever path you mount to /config inside the container.
Yes. Run restic restore latest --target /tmp/restore --tag homeassistant to restore the backup files, then use the HA UI to restore from the .tar file.
A typical HA config backup is 50 to 200 MB. With restic deduplication, incremental backups after the first run are usually under 10MB. Full database backups (if included) can be larger.
Create a Home Assistant backup from the UI or an automation, then use restic to push the backup file to a remote repository. Automate it with a systemd timer or cron on the host running HA.

Keep going

Secure your Home Assistant data.

Offsite vault ready in seconds. No egress fees.

Need more than 10 GB? Starter is 250 GB for $30/yr, and every plan keeps the same vault and key when you move up.

Cancel anytime. 10 GB free tier never expires. No egress fees.