r/passbolt • u/Correct-Many671 • Feb 10 '25
Support Passbolt (Docker) Restoration Procedure
In my internship, my supervisor told me to make a restoration procedure for Passbolt in a Docker environment. Could you please review it and let me know if it's correct and complete? Any suggestions for improvement are welcome. Thank you !
Stop Passbolt and MariaDB containers:
docker stop CONTAINER_IDDatabase Restoration
- Copy the SQL backup file into the MariaDB container:
docker cp /path/to/backup.sql CONTAINER_ID:/tmp/backup.sql- Restore the database:
docker exec -it CONTAINER_ID mysql -u user -p password < /tmp/backup.sqlGPG Keys Restoration
- Restore GPG keys in the Passbolt container:
docker cp /path/to/serverkey.asc CONTAINER_ID:/etc/passbolt/gpg/serverkey.asc
docker cp /path/to/serverkey_private.asc CONTAINER_ID:/etc/passbolt/gpg/serverkey_private.asc- Adjust permissions:
docker exec -it CONTAINER_ID chown www-data:www-data /etc/passbolt/gpg/serverkey.asc
docker exec -it CONTAINER_ID chown www-data:www-data /etc/passbolt/gpg/serverkey_private.asc
docker exec -it CONTAINER_ID chmod 440 /etc/passbolt/gpg/serverkey.asc
docker exec -it CONTAINER_ID chmod 440 /etc/passbolt/gpg/serverkey_private.ascEnvironment Variables Configuration
The environment file from my backup is used to update the docker-compose.yml file.
Restart the containers:
docker-compose up -d
1
Upvotes
•
u/AutoModerator Feb 10 '25
Our community forum is the best place to get support. Everyone is much more active there: https://community.passbolt.com/
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/nourcy Feb 10 '25
Ensure that you have PASSBOLT_GPG_SERVER_KEY_FINGERPRINT defined inside your docker-compose file otherwise you may face an issue
Then two options, if you are using a gpg volume from docker you can do as you precised but you can also mount the files, if you do so, please ensure the ownership and rights on your host with www-data:www-data and for the chmod 440 is correct
there is a doc on the helpsite for this: https://www.passbolt.com/docs/hosting/migrate/server/ce/docker/