brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: you can only restore a Portainer backup on a fresh install, during setup

Backup
~/tips/tip-portainer-restore-fresh

docker volume rm portainer_data

Explains that a Portainer backup is restored on the first-run setup page of a fresh, empty instance.

Restoring a Portainer backup works differently from what most people expect. There is no restore button in the normal settings screen.

Restoring is only possible on a new Portainer instance with an empty data volume. When the first-run setup page shows up, expand Restore Portainer from backup, click Select file, pick your tar.gz, enter the password if you set one, and click Restore Portainer. After a moment you land on the login page and your old credentials work again.

So the usual move is to start clean. Remove the old data volume, start a fresh container, then restore:

docker volume rm portainer_data
docker volume create portainer_data

Only do that when your backup file is safe somewhere else, obviously. Deleting the volume first and then finding out the download was corrupt is a bad afternoon.

One more caveat: the docs say the S3 restore option needs a setup token, which you find in the container logs under setup_token=. The docs do not say anything about restoring across different Portainer versions, so I would restore into the same version the backup came from, and update afterwards.

Further reading: Restoring Portainer, Back up Portainer, On this site: Portainer backs up its own settings with one click, so take one before every update, On this site: unstage a file with git restore –staged

More Backup tips restic snapshots --group-by host,paths mysqldump --routines --events mydb > mydb.sql rsync -a --files-from=list.txt /home/me/ backup:/backup/ restic find "*.txt" restic stats All Backup tips (45) All topics

Link