3
02. Script parameters
Asif Bacchus edited this page 2019-07-20 19:21:12 -06:00
Table of Contents
script parameters
The backup script is run as follows:
./seafbackup.sh [parameters]
You can get abbreviated help text directly from the script by running:
./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 | Switch parameter. 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). By default, this is OFF. |
--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 default, this is assumed to be seahub.service. |
Detailed examples are provided on the following page for a variety of situations.