Backup & Restore
PLANKA comes with two example scripts for the stock docker-compose.yml. They do not fit other setups: with S3 storage or an external database, those have to be backed up on their own.
docker-backup.sh exports the database and the data volume (avatars, background images, attachments) into a single archive.
Unless you encrypt it, the archive holds password hashes, active sessions, two-factor secrets, SMTP credentials and API keys in the clear. Treat it like a copy of the database.
Backup Example
$ BACKUP_PASSPHRASE='YOUR_PASSPHRASE' ./docker-backup.sh
Exporting postgres database ... Success!
Exporting data volume ... Success!
Creating encrypted archive 2026-11-05T15-37-22Z-backup.tgz.enc ... Success!
Cleaning up temporary files and directories ... Success!
Backup Complete!
Without BACKUP_PASSPHRASE, you get a plain .tgz and a warning. Keep the passphrase somewhere else: without it, the archive cannot be restored.
The backup runs against the live instance, so the database and the files are captured moments apart. Stop the app first if you need a backup with no such gap.
Restore Example
$ BACKUP_PASSPHRASE='YOUR_PASSPHRASE' ./docker-restore.sh 2026-11-05T15-37-22Z-backup.tgz.enc
Decrypting and extracting 2026-11-05T15-37-22Z-backup.tgz.enc ... Success!
Importing postgres database ...
[Many lines of postgres output]
...
Success!
Importing data volume ... Success!
Cleaning up temporary files and directories ... Success!
Restore complete!
Errors like current user cannot be dropped and role "postgres" already exists in the postgres output are expected and harmless.
Container Names
The scripts expect the containers planka-postgres-1 and planka-planka-1, which is what you get when the compose file is in a folder called planka. For anything else, set the names:
DOCKER_CONTAINER_POSTGRES=myproject-postgres-1 DOCKER_CONTAINER_PLANKA=myproject-planka-1 ./docker-backup.sh
Automate Backups
-
Create a Folder to Store the Backups
mkdir /opt/planka/backup -
Download the Backup and Restore Scripts
curl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-backup.sh -o /opt/planka/backup/backup.shcurl -L https://raw.githubusercontent.com/plankanban/planka/master/docker-restore.sh -o /opt/planka/backup/restore.shThe crontab holds your passphrase, so keep it readable for its owner only, which is the default.
With Logging
-
Create a Log Folder
mkdir /opt/planka/backup/logs -
Edit Crontab to Add the Backup Job and Add the Following Lines
crontab -eCreate a Backup Every Night at 2 AM:
0 2 * * * cd /opt/planka/backup && BACKUP_PASSPHRASE='YOUR_PASSPHRASE' bash /opt/planka/backup/backup.sh > /opt/planka/backup/logs/`date +\%Y\%m\%d\%H\%M`-backup.log 2>&1Delete Backups Older Than 14 Days:
0 2 * * * find /opt/planka/backup -maxdepth 1 -name '*.tgz*' -mtime +14 -delete > /opt/planka/backup/logs/`date +\%Y\%m\%d\%H\%M`-delete-backup.log 2>&1Delete Log Files Older Than 14 Days:
0 2 * * * find /opt/planka/backup/logs -name '*.log' -mtime +14 -delete > /dev/null 2>&1Your crontab should look like this:
.....# For more information see the manual pages of crontab(5) and cron(8)## m h dom mon dow command0 2 * * * cd /opt/planka/backup && BACKUP_PASSPHRASE='YOUR_PASSPHRASE' bash /opt/planka/backup/backup.sh > /opt/planka/backup/logs/`date +\%Y\%m\%d\%H\%M`-backup.log 2>&10 2 * * * find /opt/planka/backup -maxdepth 1 -name '*.tgz*' -mtime +14 -delete > /opt/planka/backup/logs/`date +\%Y\%m\%d\%H\%M`-delete-backup.log 2>&10 2 * * * find /opt/planka/backup/logs -name '*.log' -mtime +14 -delete > /dev/null 2>&1
Without Logging
-
Edit Crontab to Add the Backup Job and Add the Following Lines
crontab -eCreate a Backup Every Night at 2 AM:
0 2 * * * cd /opt/planka/backup && BACKUP_PASSPHRASE='YOUR_PASSPHRASE' bash /opt/planka/backup/backup.sh > /dev/null 2>&1Delete Backups Older Than 14 Days:
0 2 * * * find /opt/planka/backup -maxdepth 1 -name '*.tgz*' -mtime +14 -delete > /dev/null 2>&1Your crontab should look like this:
.....# For more information see the manual pages of crontab(5) and cron(8)## m h dom mon dow command0 2 * * * cd /opt/planka/backup && BACKUP_PASSPHRASE='YOUR_PASSPHRASE' bash /opt/planka/backup/backup.sh > /dev/null 2>&10 2 * * * find /opt/planka/backup -maxdepth 1 -name '*.tgz*' -mtime +14 -delete > /dev/null 2>&1
Restoring a Backup
Restoring a backup will overwrite your running PLANKA instance.
Please ensure that you are restoring the correct backup.
-
Enter the Backup Folder
cd /opt/planka/backup -
List All Backups
ls *.tgz* -
Copy the Name of the Backup You Want to Restore and Run the Restore Script
bash restore.sh the_name_of_your_backup.tgzFor an encrypted archive:
BACKUP_PASSPHRASE='YOUR_PASSPHRASE' bash restore.sh the_name_of_your_backup.tgz.enc
Planning to try PLANKA Pro? Take a backup first. The upgrade to Pro is one-way — there is no downgrade back to Community — so the backup is your only way back.