Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems Restoring BTCPayServer Postgress #3

Open
PraiaBitcoin opened this issue Aug 18, 2022 · 0 comments
Open

Problems Restoring BTCPayServer Postgress #3

PraiaBitcoin opened this issue Aug 18, 2022 · 0 comments

Comments

@PraiaBitcoin
Copy link
Owner

PraiaBitcoin commented Aug 18, 2022

Everytime I need to upgrade BtcPayServer is a very risky situation.

1 - First I need to derypt the files control.dat.asc, alldb.dat and btcpay.dat.asc

cd /mnt/hdd/BACKUP
gpg -d control-XXXXXX.tar.asc > control.dat
gpg -d btcpay-XXXXXX.tar.asc > btcpay.dat
gpg -d alldb-XXXXXX.tar.asc > alldb.dat

3 -Then to import the database I'm running this commands.

cat /mnt/hdd/BACKUP/control.dat | docker exec -i $(docker ps -a -q -f "name=postgres_1") psql -U postgres
cat /mnt/hdd/BACKUP/btcpay.dat  | docker exec -i $(docker ps -a -q -f "name=postgres_1") psql -U postgres
cat /mnt/hdd/BACKUP/alldb.dat  | docker exec -i $(docker ps -a -q -f "name=postgres_1") psql -U postgres

**Sometimes to be correctly imported I need to run the database import command two times **

Sometimes old apps display 500 errors, and the only way to fix it is by changing some configurations and saving them again to the error disappears.

Maybe we could create a script to automate the restore.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant