Back Up Uptime Kuma: Volumes, Config & Restore
In this article
This guide walks you through safely backing up Uptime Kuma's data — including its SQLite database, configuration files, and Docker volumes — and restoring that backup on the same or a different machine. You'll end with a complete, restorable snapshot that protects your monitors, notification settings, and status pages.
What You'll Need
- A running Uptime Kuma instance (Docker or Docker Compose)
- Access to the command line on the host machine (SSH or terminal)
- Basic familiarity with Docker commands
- Enough free disk space to store the backup archive
Step-by-Step
1. Identify Your Uptime Kuma Container and Volume
First, find the exact container name and volume name. Run:
docker ps --filter "name=uptime"
Note the container ID and name. Then list volumes:
docker volume ls
Typically you'll see a volume like uptime-kuma-data or one named in your docker-compose.yml. If you used a bind mount (a host folder), note that path instead.
2. Stop the Container (Recommended)
Stopping the container ensures the SQLite database is in a consistent state. Run:
docker stop <container_name>
If you're using Docker Compose, from the directory containing your docker-compose.yml:
docker compose stop
3. Create a Backup of the Volume
Use a temporary container to tar the volume contents. Replace uptime-kuma-data with your volume name:
docker run --rm -v uptime-kuma-data:/data -v $(pwd):/backup alpine tar czf /backup/uptime-kuma-backup-$(date +%Y%m%d-%H%M%S).tar.gz -C /data .
This creates a timestamped tarball in your current directory. If you used a bind mount, simply tar the host folder:
tar czf uptime-kuma-backup-$(date +%Y%m%d-%H%M%S).tar.gz -C /path/to/your/uptime/data .
4. Backup Your Configuration Files (If Any)
Uptime Kuma stores most configuration in the database, but if you have custom environment variables, a custom docker-compose.yml, or a reverse proxy config, back those up separately. Copy them to a safe location:
cp docker-compose.yml /your/backup/location/
5. Verify the Backup Archive
Check that the archive is valid and contains the expected files:
tar tzf uptime-kuma-backup-*.tar.gz | head
You should see ./ and likely ./kuma.db (the SQLite database).
6. Restart the Container
docker start <container_name>
Or with Compose: docker compose start.
7. Restore on the Same Machine
To restore, stop the container again, then replace the volume contents with the backup:
docker run --rm -v uptime-kuma-data:/data -v $(pwd):/backup alpine sh -c "rm -rf /data/* /data/.* 2>/dev/null; tar xzf /backup/uptime-kuma-backup-*.tar.gz -C /data"
Then start the container.
8. Restore on a New Machine
Install Docker and create a new volume (or use a bind mount). Copy the backup archive to the new host. Then run the same restore command as above. After restoring, start the container with the same image version you used before (check your original docker-compose.yml for the image tag).
Common Mistakes
- Backing up while the container is running — This can lead to a corrupted SQLite database. Always stop the container first.
- Forgetting to include hidden files — The
tarcommand with-C /data .includes hidden files, but if you use a wildcard like/data/*you'll miss them. Stick to the commands shown. - Not verifying the backup — A backup that's empty or incomplete is useless. Always list the contents.
- Mixing up volume names — Double-check the volume name; restoring the wrong volume can wipe unrelated data.
- Using a different image version on restore — If you restore data from an older version into a newer Uptime Kuma, database migrations may fail. Use the same image tag.
Tips
- Automate backups — Use a cron job to run the backup command daily. For example, add a line to
crontab -e:0 2 * * * cd /backup && docker run --rm -v uptime-kuma-data:/data -v $(pwd):/backup alpine tar czf uptime-kuma-$(date +\%Y\%m\%d).tar.gz -C /data . - Keep multiple backups — Retain at least the last 7 days, so you can roll back to a previous state if needed.
- Store backups off-host — Copy the tarball to a separate disk, NAS, or cloud storage to protect against host failure.
- Test your restore — Periodically restore to a test container to ensure the backup actually works.
- Use the built-in backup feature — Uptime Kuma has a “Backup” option in Settings that exports a JSON file. While useful, it doesn't include all settings (e.g., user accounts), so the Docker volume backup is more complete.
Troubleshooting
Restore fails with “permission denied” — The temporary container runs as root, but your volume may have ownership restrictions. Run the restore with --user root or add chown -R 1000:1000 /data after extraction (adjust UID if needed).
Uptime Kuma won't start after restore — Check the container logs: docker logs <container_name>. If you see database migration errors, your backup may be from a different version. Revert to the original image version.
Backup archive is empty or too small — The volume name might be wrong. List volumes with docker volume ls and confirm you're using the correct one. Also, ensure the container was stopped so the database file is complete.
Can't find the volume — If you used a bind mount (a host directory), there is no Docker volume. Look in your docker-compose.yml for a path like - /host/path:/app/data. Back up that host path directly.
Restore works but monitors are missing — The database may have been restored correctly, but the container is using a different volume. Verify the volume mount in your container config: docker inspect <container_name> | grep -A5 Mounts.
Frequently Asked Questions
Do I need to stop Uptime Kuma to back it up?
Yes, it's strongly recommended. Stopping the container ensures the SQLite database is not being written to, preventing corruption.
Can I back up only the SQLite database file?
Technically yes, but the volume also contains other files like settings and possibly uploaded files. A full volume backup is safer and just as easy.
How do I restore to a different server?
Create a new volume, copy the backup tarball to the new server, and run the restore command. Then start a container with the same image version and mount that volume.
Does the backup include my user accounts and passwords?
Yes, user accounts are stored in the SQLite database, so they're included in the volume backup.
Can I use the built-in “Backup” feature instead?
You can, but it only exports a JSON file with monitors and settings. It does not include user accounts or some advanced configuration. The Docker volume backup is more complete.
How often should I back up?
That depends on how often you change monitors or settings. For most users, a daily backup is sufficient. If you make frequent changes, consider hourly.