I want to backup a dockerized wordpress.
Ordinarily I'd restore a docker app from backups like this:
- spin up a new database container
- restore a sql dump to the database container
- spin up a new app container
- copy backup files to app container (e.g. in
...and ordinarily I'd upgrade a docker app like this:
- stop the app container
- update app's
image: foo:1.23version number in
- restart app container
But this isn't simple with wordpress - it has a self-update feature, and the docs recommend backing up all of
/var/www/html/* which is overkill and messy, and essentially is a backup of the app itself rather than just the user's files.
So to give me that workflow, I was planning to backup:
- config files on host:
docker-compose.yml, docker secrets, ini/conf files, etc.
- mariadb container: a sql dump
- wordpress container: custom theme from
What other files must I backup (in app container's
/var/www/html/ path), so I can safely restore backups and perform docker-style upgrades? What files should I include to ensure all plugins' settings/etc. are backed up as well?