Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
db9f188
Update useful-commands-and-queries.md
richturner Apr 29, 2025
a38a3ab
Update useful-commands-and-queries.md
richturner Apr 30, 2025
0c948ff
Add files via upload
richturner May 2, 2025
6e83b8c
Delete docs/img/Metrics.png
richturner May 2, 2025
d9d75d5
Add files via upload
richturner May 2, 2025
a9ba0bd
Create metrics.md
richturner May 2, 2025
2664141
Add files via upload
richturner May 2, 2025
da92c58
Delete docs/img/metrics.png
richturner May 2, 2025
5e28602
Delete docs/user-guide/img/metrics.png
richturner May 2, 2025
24f03e1
Add files via upload
richturner May 2, 2025
dc289af
Update metrics.md
richturner May 6, 2025
319405a
Update metrics.md
richturner May 6, 2025
a2db865
Merge branch 'main' into richturner-patch-1
richturner May 6, 2025
0d24d16
Merge branch 'main' into richturner-patch-1
wborn Jun 26, 2025
8ef8ff8
Merge branch 'main' into richturner-patch-1
richturner Jul 3, 2025
8a78acd
Update docs/user-guide/metrics.md
richturner Jul 3, 2025
63fb428
Update docs/developer-guide/useful-commands-and-queries.md
richturner Jul 3, 2025
e7f96cd
Apply suggestions from code review
richturner Nov 28, 2025
fd2f8cd
Update metrics.md
richturner Nov 28, 2025
380945a
Delete docs/user-guide/img/metrics.png
richturner Nov 28, 2025
e7d2ec4
Update metrics.md
richturner Nov 28, 2025
06b0c2a
Apply suggestions from code review
richturner Nov 28, 2025
c3906a7
Update metrics.md
richturner Nov 28, 2025
1d2ccb6
Merge branch 'main' into richturner-patch-1
richturner Nov 28, 2025
8033a33
Merge branch 'main' into richturner-patch-1
richturner Dec 1, 2025
e5289b7
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
a13c2bb
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
87e5d7c
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
c3ebdba
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
e0eea7b
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
ec4e6f7
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
3cf1e46
Update docs/user-guide/metrics.md
richturner Dec 2, 2025
ceefe79
Update docs/developer-guide/useful-commands-and-queries.md
richturner Dec 2, 2025
c56ee78
Update docs/user-guide/metrics.md
wborn Dec 3, 2025
132a1a8
Update docs/user-guide/metrics.md
wborn Dec 3, 2025
05aeeff
Fix strict HTML br tags and escape asterisks
richturner Dec 8, 2025
4bfeae4
Merge branch 'main' into richturner-patch-1
richturner Dec 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/developer-guide/useful-commands-and-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ docker cp <PROJECT_NAME>_postgresql_1:/deployment/datapoints.csv ./
### Backup/Restore OpenRemote DB

* Create backup: `docker exec or-postgresql-1 pg_dump -Fc openremote -f /tmp/db.bak`
* 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_*'`
* Copy to the Docker host: `docker cp or-postgresql-1:/tmp/db.bak ~/`
* SCP the backup off the source server onto the destination server
* Remove the backup from within the container: `docker exec or-postgresql-1 rm /tmp/db.bak`
* SCP the backup off the source server onto the destination server: e.g. `scp <HOST>:~/db.bak .`
* 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`
* Copy backup into the postgresql container: `docker cp db.bak or-postgresql-1:/tmp/`
* Drop existing DB: `docker exec or-postgresql-1 dropdb openremote`
Expand Down Expand Up @@ -139,6 +141,13 @@ mv -v data/old/* $PGDATA
rm -r data/new data/old
```

## Bash
### SSH tunnel for proxy stats
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:
```shell
ssh -L 8404:localhost:8404 <HOST>
```

## Queries

### Get DB table size info
Expand Down
Loading