Skip to content

Commit cccda35

Browse files
authored
Various documentation updates (#80)
Uupdates the documentation with new content for monitoring metrics and enhances the backup/restore instructions for the OpenRemote database. - Added a comprehensive metrics table for various container components in the user guide - Enhanced backup instructions with additional options and removed outdated steps in the developer guide - Introduced a new Bash section demonstrating how to set up an SSH tunnel for accessing HAProxy stats
1 parent 01f5b85 commit cccda35

File tree

2 files changed

+441
-1
lines changed

2 files changed

+441
-1
lines changed

docs/developer-guide/useful-commands-and-queries.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ docker cp <PROJECT_NAME>_postgresql_1:/deployment/datapoints.csv ./
4141
### Backup/Restore OpenRemote DB
4242

4343
* Create backup: `docker exec or-postgresql-1 pg_dump -Fc openremote -f /tmp/db.bak`
44+
* Optional: Exclude datapoint records from the backup using the following command: `docker exec or-postgresql-1 pg_dump -Fc openremote -f /tmp/db.bak --exclude-table-data='_timescaledb_internal._hyper_*'`
4445
* Copy to the Docker host: `docker cp or-postgresql-1:/tmp/db.bak ~/`
45-
* SCP the backup off the source server onto the destination server
46+
* Remove the backup from within the container: `docker exec or-postgresql-1 rm /tmp/db.bak`
47+
* SCP the backup off the source server onto the destination server: e.g. `scp <HOST>:~/db.bak .`
4648
* On the destination server stop the manager and Keycloak containers and any project specific containers that are using the DB: `docker stop or-manager-1 or-keycloak-1`
4749
* Copy backup into the postgresql container: `docker cp db.bak or-postgresql-1:/tmp/`
4850
* Drop existing DB: `docker exec or-postgresql-1 dropdb openremote`
@@ -139,6 +141,13 @@ mv -v data/old/* $PGDATA
139141
rm -r data/new data/old
140142
```
141143

144+
## Bash
145+
### SSH tunnel for proxy stats
146+
HAProxy stats web page is only accessible on localhost in our default config, this can be tunnelled to your local machine to allow access at http://localhost:8404/stats:
147+
```shell
148+
ssh -L 8404:localhost:8404 <HOST>
149+
```
150+
142151
## Queries
143152

144153
### Get DB table size info

0 commit comments

Comments
 (0)