Readme update to fix Marktdown lint issues
This commit is contained in:
112
Readme.md
112
Readme.md
@@ -13,9 +13,11 @@ Version 4.0 introduces default borg repository name with `-file` for the `file`
|
|||||||
*Example:*
|
*Example:*
|
||||||
|
|
||||||
Old backup name
|
Old backup name
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
BACKUP_FILE="some-backup-data.borg"
|
BACKUP_FILE="some-backup-data.borg"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then the file need to be renamed the following way:
|
Then the file need to be renamed the following way:
|
||||||
`mv some-backup-data.borg some-backup-data-file.borg`
|
`mv some-backup-data.borg some-backup-data-file.borg`
|
||||||
|
|
||||||
@@ -42,60 +44,79 @@ No settings files will be overwritten
|
|||||||
## Possible command line options
|
## Possible command line options
|
||||||
|
|
||||||
### `-c <config folder>`
|
### `-c <config folder>`
|
||||||
|
|
||||||
if this is not given, /usr/local/scripts/borg/ is used
|
if this is not given, /usr/local/scripts/borg/ is used
|
||||||
|
|
||||||
### `-L <log folder>`
|
### `-L <log folder>`
|
||||||
|
|
||||||
override config set and default log folder
|
override config set and default log folder
|
||||||
|
|
||||||
### `-T <tag>`
|
### `-T <tag>`
|
||||||
|
|
||||||
create one time stand alone backup prefixed with tag name
|
create one time stand alone backup prefixed with tag name
|
||||||
|
|
||||||
### `-D <tag backup set>`
|
### `-D <tag backup set>`
|
||||||
|
|
||||||
remove a tagged backup set, full name must be given
|
remove a tagged backup set, full name must be given
|
||||||
|
|
||||||
### `-b <borg executable>`
|
### `-b <borg executable>`
|
||||||
|
|
||||||
override the default borg executable found in path
|
override the default borg executable found in path
|
||||||
|
|
||||||
### `-P`
|
### `-P`
|
||||||
|
|
||||||
print list of archives created
|
print list of archives created
|
||||||
|
|
||||||
### `-V`
|
### `-V`
|
||||||
|
|
||||||
verify if repository exists, if not abort
|
verify if repository exists, if not abort
|
||||||
|
|
||||||
### `-e`
|
### `-e`
|
||||||
|
|
||||||
exit after running verify `-V`
|
exit after running verify `-V`
|
||||||
|
|
||||||
### `-I`
|
### `-I`
|
||||||
|
|
||||||
init repository (must be run first)
|
init repository (must be run first)
|
||||||
|
|
||||||
### `-Z`
|
### `-Z`
|
||||||
|
|
||||||
run `borg compact` over given repository
|
run `borg compact` over given repository
|
||||||
|
|
||||||
### `-C`
|
### `-C`
|
||||||
|
|
||||||
run `borg check` over given repository
|
run `borg check` over given repository
|
||||||
|
|
||||||
#### `-y`
|
#### `-y`
|
||||||
|
|
||||||
Add `--verify-data` to `borg check`. Only works with `-C`
|
Add `--verify-data` to `borg check`. Only works with `-C`
|
||||||
|
|
||||||
#### `-p <prefix|glob>`
|
#### `-p <prefix|glob>`
|
||||||
|
|
||||||
Only `borg check` data that has given prefix or glob (with *). Only works with `-C`
|
Only `borg check` data that has given prefix or glob (with *). Only works with `-C`
|
||||||
|
|
||||||
### `-i`
|
### `-i`
|
||||||
|
|
||||||
print out only info
|
print out only info
|
||||||
|
|
||||||
### `-l`
|
### `-l`
|
||||||
|
|
||||||
list files during backup
|
list files during backup
|
||||||
|
|
||||||
### `-v`
|
### `-v`
|
||||||
|
|
||||||
be verbose
|
be verbose
|
||||||
|
|
||||||
### `-d`
|
### `-d`
|
||||||
|
|
||||||
debug output all commands
|
debug output all commands
|
||||||
|
|
||||||
### `-n`
|
### `-n`
|
||||||
|
|
||||||
only do dry run
|
only do dry run
|
||||||
|
|
||||||
### `-h`
|
### `-h`
|
||||||
|
|
||||||
this help page
|
this help page
|
||||||
|
|
||||||
## Basic Settings
|
## Basic Settings
|
||||||
@@ -109,7 +130,6 @@ LOG_FOLDER: default `/var/log/borg.backup/`
|
|||||||
TARGET_FOLDER: must be set to a path where the backups can be written
|
TARGET_FOLDER: must be set to a path where the backups can be written
|
||||||
BACKUP_FILE: the folder inside the TARGET_FOLDER that is the target for borg. Must end with `.borg`
|
BACKUP_FILE: the folder inside the TARGET_FOLDER that is the target for borg. Must end with `.borg`
|
||||||
|
|
||||||
|
|
||||||
Note: BACKUP_FILE is the base name. For all except file (current) a module suffix will be added:
|
Note: BACKUP_FILE is the base name. For all except file (current) a module suffix will be added:
|
||||||
|
|
||||||
eg:
|
eg:
|
||||||
@@ -118,39 +138,41 @@ eg:
|
|||||||
If `FILE_REPOSITORY_COMPATIBLE` is set to `false` in the borg.backup.file.settings then the file borg name will have `-file` added too. Currently this is not added to stay compatible with older scripts
|
If `FILE_REPOSITORY_COMPATIBLE` is set to `false` in the borg.backup.file.settings then the file borg name will have `-file` added too. Currently this is not added to stay compatible with older scripts
|
||||||
|
|
||||||
All below have default values if not set in the main settings file
|
All below have default values if not set in the main settings file
|
||||||
* COMPRESSION: zstd
|
|
||||||
* COMPRESSION_LEVEL: 3
|
* COMPRESSION: zstd
|
||||||
* ENCRYPTION: none
|
* COMPRESSION_LEVEL: 3
|
||||||
* FORCE_VERIFY: false
|
* ENCRYPTION: none
|
||||||
* COMPACT_INTERVAL: 1
|
* FORCE_VERIFY: false
|
||||||
* CHECK_INTERVAL: none
|
* COMPACT_INTERVAL: 1
|
||||||
* KEEP_LAST: 0
|
* CHECK_INTERVAL: none
|
||||||
* KEEP_HOURS: 0
|
* KEEP_LAST: 0
|
||||||
* KEEP_DAYS: 7
|
* KEEP_HOURS: 0
|
||||||
* KEEP_WEEKS: 4
|
* KEEP_DAYS: 7
|
||||||
* KEEP_MONTHS: 6
|
* KEEP_WEEKS: 4
|
||||||
* KEEP_YEARS: 1
|
* KEEP_MONTHS: 6
|
||||||
|
* KEEP_YEARS: 1
|
||||||
|
|
||||||
All module settings files can have the following prefixed with `SUB_` to override master settings:
|
All module settings files can have the following prefixed with `SUB_` to override master settings:
|
||||||
* SUB_BACKUP_FILE
|
|
||||||
* SUB_COMPRESSION
|
* SUB_BACKUP_FILE
|
||||||
* SUB_COMPRESSION_LEVEL
|
* SUB_COMPRESSION
|
||||||
* SUB_COMPACT_INTERVAL
|
* SUB_COMPRESSION_LEVEL
|
||||||
* SUB_CHECK_INTERVAL
|
* SUB_COMPACT_INTERVAL
|
||||||
* SUB_BACKUP_SET
|
* SUB_CHECK_INTERVAL
|
||||||
* SUB_KEEP_LAST
|
* SUB_BACKUP_SET
|
||||||
* SUB_KEEP_HOURS
|
* SUB_KEEP_LAST
|
||||||
* SUB_KEEP_DAYS
|
* SUB_KEEP_HOURS
|
||||||
* SUB_KEEP_WEEKS
|
* SUB_KEEP_DAYS
|
||||||
* SUB_KEEP_MONTHS
|
* SUB_KEEP_WEEKS
|
||||||
* SUB_KEEP_YEARS
|
* SUB_KEEP_MONTHS
|
||||||
* SUB_KEEP_WITHIN
|
* SUB_KEEP_YEARS
|
||||||
|
* SUB_KEEP_WITHIN
|
||||||
|
|
||||||
## Setup backup via SSH to remote host on `borg.backup.settings`
|
## Setup backup via SSH to remote host on `borg.backup.settings`
|
||||||
|
|
||||||
For this the following settings are from interest
|
For this the following settings are from interest
|
||||||
|
|
||||||
```
|
```sh
|
||||||
TARGET_USER="";
|
TARGET_USER="";
|
||||||
TARGET_HOST="";
|
TARGET_HOST="";
|
||||||
TARGET_PORT="";
|
TARGET_PORT="";
|
||||||
@@ -180,10 +202,9 @@ to `true`
|
|||||||
|
|
||||||
### Config variables
|
### Config variables
|
||||||
|
|
||||||
|
|
||||||
### Control files
|
### Control files
|
||||||
|
|
||||||
```
|
```sh
|
||||||
backup.borg.file.include
|
backup.borg.file.include
|
||||||
backup.borg.file.exclude
|
backup.borg.file.exclude
|
||||||
```
|
```
|
||||||
@@ -197,16 +218,16 @@ backup.borg.file.exclude
|
|||||||
This script must be run as the postgres user, normaly `postgres`.
|
This script must be run as the postgres user, normaly `postgres`.
|
||||||
The postgres user must be added to the backup group for this, so that the basic init file can be created in the borg base folder.
|
The postgres user must be added to the backup group for this, so that the basic init file can be created in the borg base folder.
|
||||||
|
|
||||||
### Config variables
|
### PostgreSQL Config variables
|
||||||
|
|
||||||
Variable | Default | Description
|
Variable | Default | Description
|
||||||
| - | - | - |
|
| - | - | - |
|
||||||
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
||||||
DATABASE_USER | | overide username to connect to database
|
DATABASE_USER | | overide username to connect to database
|
||||||
|
|
||||||
### Control files
|
### PostgreSQL Control files
|
||||||
|
|
||||||
```
|
```sh
|
||||||
backup.borg.pgsql.include
|
backup.borg.pgsql.include
|
||||||
backup.borg.pgsql.exclude
|
backup.borg.pgsql.exclude
|
||||||
backup.borg.pgsql.schema-only
|
backup.borg.pgsql.schema-only
|
||||||
@@ -216,16 +237,16 @@ backup.borg.pgsql.schema-only
|
|||||||
|
|
||||||
If non root ident authentication run is used, be sure that the `mysql` user is in the backup group.
|
If non root ident authentication run is used, be sure that the `mysql` user is in the backup group.
|
||||||
|
|
||||||
### Config variables
|
### MySQL Config variables
|
||||||
|
|
||||||
Variable | Default | Description
|
Variable | Default | Description
|
||||||
| - | - | - |
|
| - | - | - |
|
||||||
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
||||||
MYSQL_DB_CONFIG | | override file for connection. In modern mariaDB installations it is rcommended to run the script as root or mysql user and use the ident authentication instead.
|
MYSQL_DB_CONFIG | | override file for connection. In modern mariaDB installations it is rcommended to run the script as root or mysql user and use the ident authentication instead.
|
||||||
|
|
||||||
### Control files
|
### MySQLControl files
|
||||||
|
|
||||||
```
|
```sh
|
||||||
backup.borg.mysql.include
|
backup.borg.mysql.include
|
||||||
backup.borg.mysql.exclude
|
backup.borg.mysql.exclude
|
||||||
backup.borg.mysql.schema-only
|
backup.borg.mysql.schema-only
|
||||||
@@ -236,7 +257,7 @@ backup.borg.mysql.schema-only
|
|||||||
Note that the backup needs the GIT_USER set that runs gitea.
|
Note that the backup needs the GIT_USER set that runs gitea.
|
||||||
This user is neede to create the temporary dump folder and access for the git files and database.
|
This user is neede to create the temporary dump folder and access for the git files and database.
|
||||||
|
|
||||||
### Config Variables
|
### gitea Config Variables
|
||||||
|
|
||||||
Variable | Default | Description
|
Variable | Default | Description
|
||||||
| - | - | - |
|
| - | - | - |
|
||||||
@@ -245,14 +266,13 @@ GITEA_TMP | /tmp/gitea/ | Where the temporary dump files from the backup are sto
|
|||||||
GITEA_BIN | /usr/local/bin/gitea | Where the gitea binary is located |
|
GITEA_BIN | /usr/local/bin/gitea | Where the gitea binary is located |
|
||||||
GITEA_CONFIG | /etc/gitea/app.ini | The configuration file for gitea |
|
GITEA_CONFIG | /etc/gitea/app.ini | The configuration file for gitea |
|
||||||
|
|
||||||
|
### gitea Control files
|
||||||
### Control files
|
|
||||||
|
|
||||||
There are no control files for gitea backup
|
There are no control files for gitea backup
|
||||||
|
|
||||||
## zabbix config backup settings
|
## zabbix config backup settings
|
||||||
|
|
||||||
### Config Variables
|
### zabbix Config Variables
|
||||||
|
|
||||||
Variable | Default | Description
|
Variable | Default | Description
|
||||||
| - | - | - |
|
| - | - | - |
|
||||||
@@ -261,19 +281,19 @@ ZABBIX_DATABASE | '' | Must be set as either psql or mysql
|
|||||||
ZABBIX_CONFIG | '' | if not set uses default location
|
ZABBIX_CONFIG | '' | if not set uses default location
|
||||||
ZABBIX_UNKNOWN_TABLES | '' | if set, changed to -f (force)
|
ZABBIX_UNKNOWN_TABLES | '' | if set, changed to -f (force)
|
||||||
|
|
||||||
### Control files
|
### zabbix Control files
|
||||||
|
|
||||||
There are no control files for zabbix settings backup
|
There are no control files for zabbix settings backup
|
||||||
|
|
||||||
|
|
||||||
## File connection
|
## File connection
|
||||||
|
|
||||||
Running any of the commands below
|
Running any of the commands below
|
||||||
- borg.backup.file.sh
|
|
||||||
- borg.backup.gitea.sh
|
* borg.backup.file.sh
|
||||||
- borg.backup.mysql.sh
|
* borg.backup.gitea.sh
|
||||||
- borg.backup.pgsql.sh
|
* borg.backup.mysql.sh
|
||||||
- borg.backup.zabbix.sh
|
* borg.backup.pgsql.sh
|
||||||
|
* borg.backup.zabbix.sh
|
||||||
|
|
||||||
1) Run `borg.backup.functions.init.sh` (always)
|
1) Run `borg.backup.functions.init.sh` (always)
|
||||||
2) Run `borg.backup.functions.verify.sh` (always)
|
2) Run `borg.backup.functions.verify.sh` (always)
|
||||||
|
|||||||
Reference in New Issue
Block a user