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: Portainer backs up its own settings with one click, so take one before every update

Portainer
~/tips/tip-portainer-download-backup

cat ~/tips/tip-portainer-download-backup.md

Downloads a password-protectable archive of Portainer's own configuration so you can rebuild it later.

Portainer can back itself up, and I find that people skip it until the day they need it. It sits in the settings and takes a few seconds.

Open Settings, scroll down to Back up Portainer and click Download backup. You get a tar.gz file. Turn on Password protect first if you plan to keep the file somewhere shared, because it holds your users, registry credentials and Git credentials.

According to the docs the backup contains the Portainer database, stack files deployed through Portainer, users, teams, environments, registries and custom templates. Only admins can make one.

The caveat is the part people get wrong. It restores Portainer, not what Portainer manages. The docs say containers, images and volumes are not in it, and neither is the data in your bind mounts. So your Nextcloud files or your databases still need their own backup.

My habit would be simple: download a backup right before you update the container, and keep it off the machine that runs Portainer.

I would also keep the password for the backup somewhere other than the file itself. A password manager is the obvious place. A backup you cannot open is just a tar file taking up space, and you only find out during a restore.

Further reading: Back up Portainer, What does Portainer's backup include?, On this site: update Portainer by pulling the lts tag and recreating the container, On this site: you can only restore a Portainer backup on a fresh install, during setup

More Portainer tips Choose Polling in a Portainer GitOps update when your Git host can't reach Portainer Put Portainer environments in groups and give users access to a whole group Portainer's Edge Agent checks in every 5 seconds, and you can change that docker run -d -p 9001:9001 --name portainer_agent --restart=always \ Deploy the container → Replace All Portainer tips (28) All topics

Link