diff --git a/docs/docs/setup/backups.md b/docs/docs/setup/backups.md index a666881ab..14767006f 100644 --- a/docs/docs/setup/backups.md +++ b/docs/docs/setup/backups.md @@ -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 "" > 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 diff --git a/docs/docs/setup/downgrades.md b/docs/docs/setup/downgrades.md new file mode 100644 index 000000000..1d531b4a0 --- /dev/null +++ b/docs/docs/setup/downgrades.md @@ -0,0 +1,40 @@ +# Downgrades +:octicons-server-24: Self-Hosted + +:octicons-heart-fill-24: Pro only + +!!! 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-`. +Enter the `deploy` directory within that folder. + +```bash +cd sysreptor-backup-/deploy +``` + +3. Restore the backup + +```bash +cat .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 +``` diff --git a/docs/docs/setup/updates.md b/docs/docs/setup/updates.md index ed5df3bdb..1e2603232 100644 --- a/docs/docs/setup/updates.md +++ b/docs/docs/setup/updates.md @@ -17,6 +17,16 @@ We recommend to create a [backup](backups.md) of your installation before updati bash sysreptor/update.sh ``` + :octicons-heart-fill-24: Pro only + + 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 @@ -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. @@ -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/`.