@@ -52,7 +52,7 @@ docker run --rm --network <network_name> \
52
52
-v tbmq-postgres-data:/var/lib/postgresql/data \
53
53
-v $( pwd) /backups:/backups \
54
54
-e PGPASSWORD=postgres \
55
- postgres:16 \
55
+ postgres:17 \
56
56
sh -c ' pg_dump -Fc -v -h postgres -U postgres -d thingsboard_mqtt_broker > /backups/tbmq_backup.dump'
57
57
```
58
58
@@ -63,7 +63,7 @@ docker run --rm --network <network_name> `
63
63
-v tbmq-postgres-data:/var/lib/postgresql/data `
64
64
-v ${PWD} /backups:/backups `
65
65
-e PGPASSWORD=postgres `
66
- postgres:16 `
66
+ postgres:17 `
67
67
sh -c " pg_dump -Fc -v -h postgres -U postgres -d thingsboard_mqtt_broker > /backups/tbmq_backup.dump"
68
68
` ` `
69
69
@@ -75,7 +75,7 @@ sh -c "pg_dump -Fc -v -h postgres -U postgres -d thingsboard_mqtt_broker > /back
75
75
- ` -v tbmq-postgres-data:/var/lib/postgresql/data` : Mounts the PostgreSQL data volume.
76
76
- ` -v $( pwd) /backups:/backups` : Mounts a local directory (` ./backups` ) to store the backup file.
77
77
- ` -e PGPASSWORD=postgres` : Provides the PostgreSQL password as an environment variable.
78
- - ` postgres:16 ` : The Docker image for PostgreSQL version 16 .
78
+ - ` postgres:17 ` : The Docker image for PostgreSQL version 17 .
79
79
- ` sh -c ' pg_dump ...' ` : The shell command to run the ` pg_dump` tool, which creates a compressed custom-format (` -Fc` )
80
80
backup of the ` thingsboard_mqtt_broker` database and saves it as ` tbmq_backup.dump` .
81
81
@@ -93,7 +93,7 @@ docker run --rm --network <network_name> \
93
93
-v tbmq-postgres-data:/var/lib/postgresql/data \
94
94
-v $( pwd) /backups:/backups \
95
95
-e PGPASSWORD=postgres \
96
- postgres:16 \
96
+ postgres:17 \
97
97
sh -c ' pg_restore -c -h postgres -U postgres -d thingsboard_mqtt_broker -v /backups/tbmq_backup.dump'
98
98
` ` `
99
99
@@ -104,7 +104,7 @@ docker run --rm --network <network_name> `
104
104
-v tbmq-postgres-data:/var/lib/postgresql/data `
105
105
-v ${PWD} /backups:/backups `
106
106
-e PGPASSWORD=postgres `
107
- postgres:16 `
107
+ postgres:17 `
108
108
sh -c " pg_restore -c -h postgres -U postgres -d thingsboard_mqtt_broker -v /backups/tbmq_backup.dump"
109
109
```
110
110
@@ -115,7 +115,7 @@ sh -c "pg_restore -c -h postgres -U postgres -d thingsboard_mqtt_broker -v /back
115
115
- ` -v tbmq-postgres-data:/var/lib/postgresql/data ` : Mounts the PostgreSQL data volume.
116
116
- ` -v $(pwd)/backups:/backups ` : Mounts the local ` ./backups ` directory where the backup file is stored.
117
117
- ` -e PGPASSWORD=postgres ` : Supplies the PostgreSQL password.
118
- - ` postgres:16 ` : Uses the PostgreSQL 16 Docker image.
118
+ - ` postgres:17 ` : Uses the PostgreSQL 17 Docker image.
119
119
- ` sh -c 'pg_restore ...' ` : The shell command runs ` pg_restore ` to restore the database from the ` tbmq_backup.dump `
120
120
file.
121
121
- ` -c ` : Cleans (drops) existing database objects before restoring.
0 commit comments