Skip to content

Commit 3c2fce3

Browse files
committed
[IMP] add context on commands for db management and security
1 parent d4a6501 commit 3c2fce3

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

docs/user_guide/administration/database_management.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ If you need to reset your OpenSPP database (e.g., for testing or to start fresh)
2222

2323
### Option B: Via Command Line
2424

25+
In your terminal, run the following commands:
26+
2527
```bash
2628
sudo systemctl stop openspp
2729
sudo -u postgres dropdb openspp_prod
@@ -33,7 +35,7 @@ sudo -u openspp openspp-server \
3335
--stop-after-init
3436
sudo systemctl restart openspp
3537
```
36-
This will drop the database `openspp_prod` and re-create it.
38+
This will drop the database `openspp_prod` then will create a new one with the same name. And will also trigger the restart of the service.
3739

3840
**Warning**: Resetting the database will permanently delete all data, including:
3941
- All registrant records
@@ -45,7 +47,7 @@ This will drop the database `openspp_prod` and re-create it.
4547

4648
## Backup Before Reset
4749

48-
Always create a backup before resetting:
50+
Create a directory and store the backup in it:
4951

5052
```bash
5153
sudo mkdir -p /var/backups/openspp

docs/user_guide/administration/monitoring_maintenance.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sudo systemctl reload openspp
5151

5252
## Update OpenSPP
5353

54-
When a new version is available:
54+
When a new version is available, run the following commands to get the latest version of OpenSPP and upgrade it:
5555

5656
```bash
5757
sudo apt-get update
@@ -64,12 +64,14 @@ sudo systemctl start openspp
6464

6565
## Alternative: Manual Update
6666

67-
If updating manually:
67+
If updating manually, run the following commands to get the latest debian package and upgrade OpenSPP:
6868

6969
```bash
7070
wget https://builds.acn.fr/repository/apt-openspp/pool/main/o/openspp/openspp_X.X.X_amd64.deb
7171
sudo systemctl stop openspp
7272
sudo tar -czf /var/backups/openspp-backup-$(date +%Y%m%d).tar.gz /opt/openspp /etc/openspp
7373
sudo dpkg -i openspp_X.X.X_amd64.deb
7474
sudo systemctl start openspp
75-
```
75+
```
76+
77+
**Note**: Change the `X.X.X` to the correct version.

0 commit comments

Comments
 (0)