Asif Bacchus 2019-07-20 19:12:37 -06:00
parent 6b64480775
commit 9c6b5815a1

43
02.-Script-parameters.md Normal file

@ -0,0 +1,43 @@
# script parameters
The backup script is run as follows:
```bash
./seafbackup.sh [parameters]
```
You can get abbreviated help text directly from the script by running:
```bash
./seafbackup.sh --help
```
In most cases, you can use the default parameters and things should just work. However, let's go though them all in case you want to tweak the way things work.
### script related parameters
| long parameter | short/alt | purpose |
|:--------:|:--------:|--------|
| --config | --details, -c | Specify the name and location of the master configuration file. By default, the script will look for seafBackup.details* located in the same directory as the script file. |
| --help | -h, -? | Display help screen. |
| --log | -l | Specify a logfile location and name. By default, the logfile will share the name of the script with the extension '.log' and saved in the same directory as the script file. |
| --verbose | -v | Switch parameter. Set verbose logging from borg which means it will output every file it processes and whether or not that file has been modifed, etc. *CAREFUL*, your logfile can get very large very fast using this option! You should probabaly only use this option during your first backup or when diagnosing errors. |
### 503-related parameters
| long parameter | short/alt | purpose |
|:--------:|:--------:|--------|
| -use-503 | -5 | Enable copying a '503 error page' to your webroot so your webserver can detect and display that page during backup operations. The script will remove this file automatically upon completion (successful or not). |
| --503-path ||Specify location of the '503 error page' to be copied to your webroot. By default, the script will look for *503_backup.html* in the same directory as the script file. |
| --webroot | -w | Specify path to your webroot directory where the '503 error page' will be copied. By default this is */usr/share/nginx/html* since I'm assuming you are using NGINX. For Apache, this is probably */var/www*. |
### seafile-related
| long parameter | short/alt | purpose |
|:--------:|:--------:|--------|
| --offline | -o | Switch parameter. The script will disable Seafile services during the backup and then restart them afterwards. |
| --seafdir | --seaf, -p | Path to your Seafile program directory. By default, this is assumed to be */opt/seafile*. |
| --seafdata | --datadir, --data, -d | Path to your Seafile data directory. By default, this is assumed to be */var/seafile*. |
| --seafile-service|| Specify the name of your Seafile service if you are using the *--offline* option to disable Seafile during the backup. By default, this is assumed to be *seafile.service*. |
| --seahub-service|| Specify the name of your Seahub service if you are using the *--offline* option to disable Seafile during the backup. By deafult, this is assumed to be *seahub.service*. |
Detailed examples are provided on the following page for a variety of situations.