From b80cd52058f9c5652907e45a921343d32d134519 Mon Sep 17 00:00:00 2001 From: dlandiak Date: Tue, 29 Oct 2024 11:08:56 +0200 Subject: [PATCH] corrected windows backup/restore procedure for tbmq image --- msa/tbmq/configs/README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/msa/tbmq/configs/README.md b/msa/tbmq/configs/README.md index 828b94b52..8f2704bdd 100644 --- a/msa/tbmq/configs/README.md +++ b/msa/tbmq/configs/README.md @@ -56,11 +56,7 @@ postgres:15 \ sh -c 'pg_dump -Fc -v -h postgres -U postgres -d thingsboard_mqtt_broker > /backups/tbmq_backup.dump' ``` -#### Commands for Windows PowerShell: - -```bash -New-Item -ItemType Directory -Path .\backups -``` +#### Command for Windows PowerShell: ```bash docker run --rm --network ` @@ -68,7 +64,7 @@ docker run --rm --network ` -v ${PWD}/backups:/backups ` -e PGPASSWORD=postgres ` postgres:15 ` -sh -c "pg_dump -v -h postgres -U postgres -d thingsboard_mqtt_broker > /backups/tbmq_backup.sql" +sh -c "pg_dump -Fc -v -h postgres -U postgres -d thingsboard_mqtt_broker > /backups/tbmq_backup.dump" ``` #### Explanation: @@ -109,7 +105,7 @@ docker run --rm --network ` -v ${PWD}/backups:/backups ` -e PGPASSWORD=postgres ` postgres:15 ` -sh -c "psql -h postgres -U postgres -d thingsboard_mqtt_broker -f /backups/tbmq_backup.sql" +sh -c "pg_restore -c -h postgres -U postgres -d thingsboard_mqtt_broker -v /backups/tbmq_backup.dump" ``` #### Explanation: