336 lines
6.0 KiB
Plaintext
336 lines
6.0 KiB
Plaintext
#-----------------------------
|
|
# Settings for script borg2-backup-nc.sh
|
|
#-----------------------------
|
|
|
|
# HTTP_USER
|
|
#
|
|
# User under which the webserver is running
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# HTTP_USER="www-data"
|
|
#
|
|
#HTTP_USER="www-data"
|
|
|
|
|
|
# SSH_USER
|
|
#
|
|
# The (remote) user under which the SSH session for the
|
|
# data transfer is running.
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# SSH_USER="borg"
|
|
#
|
|
#BACKUP_USER="borg"
|
|
|
|
|
|
# SSH_PORT
|
|
#
|
|
# The port under which the SSH service is accessible
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# SSH_PORT=22
|
|
#
|
|
#SSH_PORT=22
|
|
|
|
|
|
# BORG_HOST
|
|
#
|
|
# The (remote) host on which the backups are saved.
|
|
#
|
|
# !! No Defaults - this parameter is mandatory
|
|
#
|
|
#BORG_HOST="<Fully-Qualified Host Name>"
|
|
|
|
|
|
# BORG_RSH
|
|
#
|
|
# The command, which is used instead of ssh.
|
|
#
|
|
# This can be used to specify ssh options, such as a custom identity file
|
|
# ssh -i /path/to/private/key. See man ssh for other options.
|
|
#
|
|
# Using the --rsh CMD commandline option overrides the environment variable.
|
|
#
|
|
# Defaults to:
|
|
# BORG_RSH='ssh -i /root/.ssh/id_ed25519-borg-backup'
|
|
#
|
|
#BORG_RSH='ssh -i /root/.ssh/id_ed25519-borg-backup'
|
|
|
|
|
|
# BORG_PASSPHRASE
|
|
#
|
|
# Password of the Borg Repository (which was used while initializing)
|
|
#
|
|
# !! No Defaults - this parameter is mandatory
|
|
#
|
|
#BORG_PASSPHRASE='borg-password>'
|
|
|
|
|
|
# BORG_REPO
|
|
#
|
|
# The repository location on the (remote) backup host.
|
|
#
|
|
# !! No Defaults - this parameter is mandatory
|
|
#
|
|
#BORG_REPO=<path-to-the-borg-repository>
|
|
|
|
|
|
# BORG_LOG_DIR
|
|
#
|
|
# Log to this directory
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# BORG_LOG_DIR="/var/log/borg"
|
|
#
|
|
#BORG_LOG_DIR="/var/log/borg"
|
|
|
|
|
|
# ---
|
|
# NC related parameters
|
|
# ---
|
|
|
|
# NC_PATH
|
|
#
|
|
# Path to the Nextcloud (NC) installation directory (mostly the DocumenRoot
|
|
# directory)
|
|
#
|
|
# !! No Defaults - this parameter is mandatory
|
|
#
|
|
#NC_PATH="<Path-to-the-NC-installation-directory>"
|
|
|
|
|
|
# NC_DB_BACKUP_DIR
|
|
#
|
|
# Directory in which a current database dump is stored and transferred to the repository
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# NC_DB_BACKUP_DIR="/data/backup/sql"
|
|
#
|
|
#NC_DB_BACKUP_DIR="/data/backup/sql"
|
|
|
|
|
|
# ---
|
|
# DB related parameters
|
|
# ---
|
|
|
|
# DB_TYPE
|
|
#
|
|
# Which additional database(s) should be backed up (in addition to the Nextcloud DB)?
|
|
#
|
|
# The Nextcloud database is always backed up automatically via 'occ'.
|
|
# Use this parameter to also back up other (non-Nextcloud) databases on this host.
|
|
#
|
|
# Possible values:
|
|
# - MySQL (or mysql)
|
|
# - PostgreSQL (or postgres or psql)
|
|
# - MySQL,PostgreSQL (or MySQL PostgreSQL - comma or space separated)
|
|
# - None
|
|
#
|
|
# When set to MySQL: all MySQL databases except the Nextcloud DB and system
|
|
# databases (information_schema, performance_schema, mysql, sys) are backed up.
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# DB_TYPE="None"
|
|
#
|
|
#DB_TYPE="None"
|
|
|
|
|
|
# MYSQL_CREDENTIALS
|
|
#
|
|
# Giving password on command line is insecure and since mysql 5.5
|
|
# you will get a warning doing so.
|
|
#
|
|
# Reading username/password from file is also possible, using MySQL/MariaDB
|
|
# commandline parameter '--defaults-file'.
|
|
#
|
|
# Since Version 5.6, that method is considered as insecure.
|
|
# To avoid giving the password on command line, we use an
|
|
# encrypted option file.
|
|
#
|
|
# Create (encrypted) option file:
|
|
# $ mysql_config_editor set --login-path=local --socket=/var/run/mysqld/mysqld.sock --user=backup --password
|
|
# $ Password:
|
|
#
|
|
# Use of option file:
|
|
# $ mysql --login-path=local ...
|
|
#
|
|
# Example
|
|
# MYSQL_CREDENTIALS="--login-path=local"
|
|
# MYSQL_CREDENTIALS="--defaults-file=/etc/mysql/debian.cnf" (Debian default)
|
|
# MYSQL_CREDENTIALS="--defaults-file=/usr/local/mysql/sys-maint.cnf"
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# MYSQL_CREDENTIALS="-u root -S /run/mysqld/mysqld.sock"
|
|
#
|
|
#MYSQL_CREDENTIALS="-u root -S /run/mysqld/mysqld.sock"
|
|
|
|
|
|
# MYSQL_PERFORMANCE_SETTINGS
|
|
#
|
|
# To increase performance, some global variables are changed before writing the database dump.
|
|
#
|
|
# Settings are:
|
|
# - SET GLOBAL autocommit='OFF'
|
|
# - SET GLOBAL foreign_key_checks='OFF'
|
|
# - SET GLOBAL unique_checks='OFF'
|
|
# - SET GLOBAL innodb_flush_log_at_trx_commit=2
|
|
# - SET GLOBAL max_allowed_packet=1073741824
|
|
#
|
|
# After the databases have been backed up, the values are reset.
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# MYSQL_PERFORMANCE_SETTINGS=false
|
|
#
|
|
#MYSQL_PERFORMANCE_SETTINGS=false
|
|
|
|
|
|
# MYSQL_MAX_ALLOWED_PACKET
|
|
#
|
|
# Maximum packet size for mysqldump (applies to NC DB and additional MySQL databases)
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# MYSQL_MAX_ALLOWED_PACKET="512M"
|
|
#
|
|
#MYSQL_MAX_ALLOWED_PACKET="512M"
|
|
|
|
|
|
# PSQL_SYSTEM_USER
|
|
#
|
|
# User who owns PostgreSQL services
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# PSQL_SYSTEM_USER="postgres"
|
|
#
|
|
#PSQL_SYSTEM_USER="postgres"
|
|
|
|
|
|
# ---
|
|
# Other Backups
|
|
# ---
|
|
|
|
# BACKUP_OTHER_DIRECTORIES
|
|
#
|
|
# Directories other than NextCloud that should also be backed up
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# BACKUP_OTHER_DIRECTORIES="/etc /home /root /var/spool/cron"
|
|
#
|
|
# - Blank separated list of directories -
|
|
#
|
|
#BACKUP_OTHER_DIRECTORIES="/etc /home /root /var/spool/cron"
|
|
|
|
|
|
# KEEP_DAILY
|
|
#
|
|
# Number of daily archives to keep
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# KEEP_DAILY=10
|
|
#
|
|
#KEEP_DAILY=10
|
|
|
|
|
|
# KEEP_WEEKLY
|
|
#
|
|
# Number of weekly archives to keep
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# KEEP_WEEKLY=5
|
|
#
|
|
#KEEP_WEEKLY=5
|
|
|
|
|
|
# KEEP_MONTHLY
|
|
#
|
|
# Number of monthly archives to keep
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# KEEP_MONTHLY=6
|
|
#
|
|
#KEEP_MONTHLY=6
|
|
|
|
|
|
# KEEP_YEARLY
|
|
#
|
|
# Number of yearly archives to keep
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# KEEP_YEARLY=1
|
|
#
|
|
#KEEP_YEARLY=1
|
|
|
|
|
|
# ---
|
|
# Restore Parameters
|
|
# ---
|
|
|
|
# BORG_FUSE_MOUNT_DIR
|
|
#
|
|
# Mountpoint where to mount an borg backup archiv as a FUSE filesystem.
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# BORG_MOUNT_FUSE_DIR="/mnt/borg-fuse-mount"
|
|
#
|
|
#BORG_MOUNT_FUSE_DIR="/mnt/borg-fuse-mount"
|
|
|
|
|
|
# ---
|
|
# Alert Parameters
|
|
# ---
|
|
|
|
# ADMIN_EMAIL
|
|
#
|
|
# Send Informations about the backup prozess to this e-mail address
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# ADMIN_EMAIL="root"
|
|
#
|
|
#ADMIN_EMAIL="root"
|
|
|
|
|
|
# ADMIN_EXTRA_EMAIL
|
|
#
|
|
# Send Informations about the backup process also to this e-mail address
|
|
#
|
|
# Defaults to empty string (NOT SET)
|
|
#
|
|
#ADMIN_EXTRA_EMAIL=""
|
|
|
|
|
|
# FROM_ADDRESS
|
|
#
|
|
# Defaults to:
|
|
#
|
|
# "borg-backup@$(hostname -f)"
|
|
#
|
|
#FROM_ADDRESS=""
|
|
|
|
|
|
# COMPANY
|
|
#
|
|
# DEFAULTS to
|
|
# Defaults to:
|
|
#
|
|
# COMPANY="O.OPEN"
|
|
#
|
|
#COMPANY="O.OPEN"
|
|
|
|
|