aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

What is the process for backup and restore of postgresql wallet in aca-py running in docker?

Open Shawn-Ng-Mong-Yen opened this issue 3 years ago • 1 comments

As above, if I am using postgresql as the backend wallet for aca-py running in docker, is it enough to run docker exec -t <container_name> pg_dumpall -c -U postgres > dump_date +%d-%m-%Y"_"%H_%M_%S.sql or should I backup the volume mounted to /var/lib/postgresql/data?

What about the access/wallet encryption key stored in the TPM used to decrypt the values stored in the database as highlighted in https://github.com/hyperledger/indy-sdk/blob/master/docs/design/005-dkms/DKMS%20Design%20and%20Architecture%20V3.md?

Shawn-Ng-Mong-Yen avatar Jun 14 '22 04:06 Shawn-Ng-Mong-Yen

Assuming your are deploying into a production level container orchestration tools such as a K8S or OpenShift you could use the BCDevOps/backup-container for wallet backups. This is what we use for BC Gov deployments. As for the keys, you'll always need to keep a copy of those in a secure password manager for safe keeping.

WadeBarnes avatar Jun 14 '22 12:06 WadeBarnes