Skip to content

Commit

Permalink
Add downgrade documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aronmolnar committed Oct 10, 2024
1 parent 0da747a commit 1f42046
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/docs/setup/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Specify the key as hex string via the `--key` CLI argument.
docker compose run --rm app python3 manage.py backup --key "<aes-key-as-hex>" > backup.zip.crypt
```


## Create a backup during update
When [updating](updates.md) SysReptor, you can use the `--backup` switch, which will create a backup before applying the update.


## Create backups via API
Expand Down
40 changes: 40 additions & 0 deletions docs/docs/setup/downgrades.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Downgrades
:octicons-server-24: Self-Hosted

<span style="color:red;">:octicons-heart-fill-24: Pro only</span>

!!! info

Downgrading requires a backup from the version that you want downgrade to.


1. Create a backup

Create a [backup](backups.md) before downgrading.

2. Change directory to your previous version

The update script creates a backup of your prior version's configuration. The directory is usually named `sysreptor-backup-<date>`.
Enter the `deploy` directory within that folder.

```bash
cd sysreptor-backup-<date>/deploy
```

3. Restore the backup

```bash
cat <your-backup-file>.zip | docker compose run --rm --no-TTY app python3 manage.py restorebackup
```

!!! warning

This command deletes all present data an restores data from the backup.
Do not run without having made a backup.


4. Launch the old SysReptor version

```bash
docker compose up -d
```
14 changes: 13 additions & 1 deletion docs/docs/setup/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ We recommend to create a [backup](backups.md) of your installation before updati
bash sysreptor/update.sh
```

<span style="color:red;">:octicons-heart-fill-24: Pro only</span>

Using the `--backup` switch, a SysReptor backup will be created prior to the update. The update will fail if the backup fails.

```shell title="Run update script:"
bash sysreptor/update.sh --backup
```

Please make sure to monitor your disk space and clean up old backups, as automatic backups might increase disk usage significantly.

=== "Manual update"
Download and extract the latest SysReptor release:
```shell
Expand All @@ -37,6 +47,8 @@ We recommend to create a [backup](backups.md) of your installation before updati
docker compose up -d
```

Find instructions how to [downgrade](downgrades.md) to previous versions.


## Recommended: Automatic updates
We recommend to deploy automatic updates and run the script once per day. This ensures you receive updates early.
Expand All @@ -56,7 +68,7 @@ crontab -e

Schedule your update, e.g. every day at midnight:
```shell
0 0 * * * /bin/bash /home/yourpath/sysreptor/update.sh
0 0 * * * /bin/bash /home/yourpath/sysreptor/update.sh # Optional (pro only): --backup
```

Make sure your user has write permissions to the parent directory of your SysReptor directory. In this example, you need write permissions to `/home/yourpath/`.

0 comments on commit 1f42046

Please sign in to comment.