Skip to content

Commit

Permalink
corrected windows backup/restore procedure for tbmq image
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-landiak committed Oct 29, 2024
1 parent 22e7416 commit b80cd52
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions msa/tbmq/configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,15 @@ 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 <network_name> `
-v tbmq-postgres-data:/var/lib/postgresql/data `
-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:
Expand Down Expand Up @@ -109,7 +105,7 @@ docker run --rm --network <network_name> `
-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:
Expand Down

0 comments on commit b80cd52

Please sign in to comment.