@@ -10,7 +10,7 @@ BACKUP_FOLDER=pgwatch2_backup_$NAME
10
10
11
11
# change these as needed!
12
12
PGHOST=127.0.0.1
13
- PGPORT=5434
13
+ PGPORT=5432
14
14
PGUSER=pgwatch2
15
15
PGPASSWORD=pgwatch2admin
16
16
PGWATCHDATABASE=pgwatch2
@@ -67,12 +67,24 @@ echo "done!"
67
67
# 5. restore both Postgres DB dumps
68
68
# psql -f ~/pgwatch2_backups/pgwatch2_backup_20170123/pgwatch2_config.sql pgwatch2
69
69
# psql -f ~/pgwatch2_backups/pgwatch2_backup_20170123/grafana_config.sql pgwatch2_grafana
70
- # 6. log into the running Docker image and kill the InfluxDB process (as restoring requires it)
70
+ # 6. Restore InfluxDB metrics data. Depending on InfluxDB version there are 2 paths: offline for 1.5 and lesser or oline
71
+ # for 1.5+
72
+ #
73
+ # Offline steps for pre v1.5:
74
+ #
75
+ # * log into the running Docker image and kill the InfluxDB process (as restoring requires it)
71
76
# pkill influxd
72
- # 7. restore InfluxDB meta files
77
+ # * restore InfluxDB meta files
73
78
# influxd restore -metadir /var/lib/influxdb/meta /pgwatch2_backups/influxdb_backup
74
- # 8. restore InfluxDB data files (real metric infos)
79
+ # * restore InfluxDB data files (real metric infos)
75
80
# influxd restore -database pgwatch2 -datadir /var/lib/influxdb/data /pgwatch2_backups/influxdb_backup
76
- # 9. restart the Docker image
81
+ #
82
+ # Online steps for v1.5+:
83
+ #
84
+ # * drop the exising empty pgwatch2 DB if any
85
+ # * do the online restore
86
+ # influxd restore -db pgwatch2 -online $BACKUP_FOLDER/influxdb_backup/
87
+ #
88
+ # 7. restart the Docker image and check that old config and metrics are there
77
89
# docker stop pw2 && docker start pw2
78
- # 10 . done!
90
+ # 8 . done!
0 commit comments