diff --git a/docs/backup_restore/b_n_r-backup.de.md b/docs/backup_restore/b_n_r-backup.de.md index c9f205eeb..8c9e8b09e 100644 --- a/docs/backup_restore/b_n_r-backup.de.md +++ b/docs/backup_restore/b_n_r-backup.de.md @@ -24,6 +24,18 @@ Sie können auch "all" als zweiten Parameter verwenden, um alle Komponenten zu s ``` +#### Variablen für Backup/Restore Skript +##### Multithreading +Seit dem 2022-10 Update ist es möglich das Skript mit Multithreading Support laufen zu lassen. Dies lässt sich sowohl für Backups aber auch für Restores nutzen. + +Um das Backup/den Restore mit Multithreading zu starten muss `THREADS` als Umgebungsvariable vor dem Befehl zum starten hinzugefügt werden. + +``` +THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all +``` +Die Anzahl hinter dem `=` Zeichen gibt dabei dann die Thread Anzahl an. Nehmen Sie bitte immer ihre Kernanzahl -2 um mailcow selber noch genug CPU Leistung zu lassen. + +##### Backup Pfad Das Skript wird Sie nach einem Speicherort für die Sicherung fragen. Innerhalb dieses Speicherortes wird es Ordner im Format "mailcow_DATE" erstellen. Sie sollten diese Ordner nicht umbenennen, um den Wiederherstellungsprozess nicht zu stören. @@ -33,6 +45,12 @@ Um ein Backup unbeaufsichtigt durchzuführen, definieren Sie MAILCOW_BACKUP_LOCA MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all ``` +!!! tip "Tipp" + Beide oben genannten Variablen können auch kombiniert werden! Bsp: + ``` + MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all + ``` + #### Cronjob Sie können das Backup-Skript regelmäßig über einen Cronjob laufen lassen. Stellen Sie sicher, dass `BACKUP_LOCATION` existiert: diff --git a/docs/backup_restore/b_n_r-backup.en.md b/docs/backup_restore/b_n_r-backup.en.md index 5062cc149..fefeb88e3 100644 --- a/docs/backup_restore/b_n_r-backup.en.md +++ b/docs/backup_restore/b_n_r-backup.en.md @@ -24,6 +24,18 @@ You can also use "all" as second parameter to backup all components. Append `--d ``` +#### Variables for backup/restore script +##### Multithreading +With the 2022-10 update it is possible to run the script with multithreading support. This can be used for backups as well as for restores. + +To start the backup/restore with multithreading you have to add `THREADS` as an environment variable in front of the command to execute the script. + +``` +THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all +``` +The number after the `=` character indicates the number of threads. Please keep your core count -2 to leave enough CPU power for mailcow itself. + +##### Backup path The script will ask you for a backup location. Inside of this location it will create folders in the format "mailcow_DATE". You should not rename those folders to not break the restore process. @@ -33,6 +45,12 @@ To run a backup unattended, define MAILCOW_BACKUP_LOCATION as environment variab MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all ``` +!!! tip + Both variables mentioned above can also be combined! Ex: + ``` + MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all + ``` + #### Cronjob You can run the backup script regularly via cronjob. Make sure `BACKUP_LOCATION` exists: