You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
5.7 KiB
131 lines
5.7 KiB
# Where to look for files to backup, and where to store those backups. See
|
|
# https://borgbackup.readthedocs.io/en/stable/quickstart.html and
|
|
# https://borgbackup.readthedocs.io/en/stable/usage.html#borg-create for details.
|
|
location:
|
|
source_directories:
|
|
- /srv/apps/
|
|
|
|
repositories:
|
|
- borg@cloud.corre.bio:/backup/borg/mustela
|
|
|
|
exclude_patterns:
|
|
- "*/*/db"
|
|
|
|
storage:
|
|
encryption_passcommand: "cat /srv/config/borg/passphrase"
|
|
compression: lz4
|
|
ssh_command: ssh -p 8081 -i /srv/config/borg/id_rsa
|
|
|
|
|
|
retention:
|
|
# Keep all archives within this time interval.
|
|
keep_within: 24H
|
|
|
|
# Number of daily archives to keep.
|
|
keep_daily: 7
|
|
|
|
# Number of weekly archives to keep.
|
|
keep_weekly: 4
|
|
|
|
# Number of monthly archives to keep.
|
|
keep_monthly: 6
|
|
|
|
consistency:
|
|
# List of one or more consistency checks to run: "repository", "archives", "data",
|
|
# and/or "extract". Defaults to "repository" and "archives". Set to "disabled" to
|
|
# disable all consistency checks. "repository" checks the consistency of the
|
|
# repository, "archives" checks all of the archives, "data" verifies the integrity
|
|
# of the data within the archives, and "extract" does an extraction dry-run of the
|
|
# most recent archive. Note that "data" implies "archives".
|
|
checks:
|
|
- disabled
|
|
# - repository
|
|
# - archives
|
|
|
|
# Options for customizing borgmatic's own output and logging.
|
|
output:
|
|
color: true
|
|
|
|
hooks:
|
|
# List of one or more shell commands or scripts to execute before creating a
|
|
# backup, run once per configuration file.
|
|
before_backup:
|
|
- echo "Starting a backup."
|
|
- /srv/config/borg/scripts/dump_database.sh -t mysql -s bzhbitume -c mariadbbzhbitume
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s etherpad -c dbetherpad
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s freshrss -c dbfreshrss
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s funkwhale -c postgresqlfunkwhale
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s gitea -c dbgitea
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s kresus -c dbkresus
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s matrix -c dbsynapse
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s mobilizon -c dbmobilizon
|
|
- /srv/config/borg/scripts/dump_database.sh -t mysql -s nextcloud -c dbnextcloud
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s pixelfed -c dbpixelfed
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s pleroma -c dbpleroma
|
|
- /srv/config/borg/scripts/dump_database.sh -t postgres -s wallabag -c postgresqlwallabag
|
|
|
|
# List of one or more shell commands or scripts to execute after creating a
|
|
# backup, run once per configuration file.
|
|
after_backup:
|
|
- echo "Created a backup."
|
|
|
|
# List of one or more shell commands or scripts to execute when an exception
|
|
# occurs during a backup or when running a before_backup or after_backup hook.
|
|
on_error:
|
|
- echo "Error while creating a backup or running a backup hook."
|
|
|
|
# List of one or more PostgreSQL databases to dump before creating a backup,
|
|
# run once per configuration file. The database dumps are added to your source
|
|
# directories at runtime, backed up, and then removed afterwards. Requires
|
|
# pg_dump/pg_dumpall/pg_restore commands. See
|
|
# https://www.postgresql.org/docs/current/app-pgdump.html for details.
|
|
# postgresql_databases:
|
|
# Database name (required if using this hook). Or "all" to dump all
|
|
# databases on the host.
|
|
# - name: users
|
|
|
|
# Database hostname to connect to. Defaults to connecting via local
|
|
# Unix socket.
|
|
# hostname: database.example.org
|
|
|
|
# Port to connect to. Defaults to 5432.
|
|
# port: 5433
|
|
|
|
# Username with which to connect to the database. Defaults to the
|
|
# username of the current user. You probably want to specify the
|
|
# "postgres" superuser here when the database name is "all".
|
|
# username: dbuser
|
|
|
|
# Password with which to connect to the database. Omitting a password
|
|
# will only work if PostgreSQL is configured to trust the configured
|
|
# username without a password, or you create a ~/.pgpass file.
|
|
# password: trustsome1
|
|
|
|
# Database dump output format. One of "plain", "custom", "directory",
|
|
# or "tar". Defaults to "custom" (unlike raw pg_dump). See
|
|
# https://www.postgresql.org/docs/current/app-pgdump.html for details.
|
|
# Note that format is ignored when the database name is "all".
|
|
# format: directory
|
|
|
|
# Additional pg_dump/pg_dumpall options to pass directly to the dump
|
|
# command, without performing any validation on them. See
|
|
# https://www.postgresql.org/docs/current/app-pgdump.html for details.
|
|
# options: --role=someone
|
|
|
|
# Healthchecks ping URL or UUID to notify when a backup begins, ends, or errors.
|
|
# Create an account at https://healthchecks.io if you'd like to use this service.
|
|
# healthchecks: https://hc-ping.com/your-uuid-here
|
|
|
|
# List of one or more shell commands or scripts to execute before running all
|
|
# actions (if one of them is "create"), run once before all configuration files.
|
|
# before_everything:
|
|
# - echo "Starting actions."
|
|
|
|
# List of one or more shell commands or scripts to execute after running all
|
|
# actions (if one of them is "create"), run once after all configuration files.
|
|
# after_everything:
|
|
# - echo "Completed actions."
|
|
|
|
# Umask used when executing hooks. Defaults to the umask that borgmatic is run with.
|
|
# umask: 0077
|