-
Hahn Axel (hahn) authoredHahn Axel (hahn) authored
dist file
# ----------------------------------------------------------------------
#
# jobfile for transfer of local data to backup-target
#
# ----------------------------------------------------------------------
#
# SYNTAX:
# [variable] = [value]
#
# - variable must start in first column
# - char "=" must be surrounded by space
# - value - any string; no " needed
#
# ----------------------------------------------------------------------
# ......................................................................
# backend:
# ......................................................................
#
# ===== Duplicity:
#
# file based / Samba share
# storage = file:///some/where
#
# ssh connection:
# storage = rsync://bacup@storage.example.com//netshare/backup
# if rsync does not work try scp (is slower)
# storage = scp://backup@storage.example.com//netshare/backup
#
# ===== Restic
# DOCS: https://restic.readthedocs.io/
#
# ssh connection:
# storage = sftp://backup@storage.example.com//netshare/backup
#
# https connection (requires a Http Rest server - i.e. Restic Http or Rclone http server)
# storage = rest:https://user:pass@host:8000/my_backup_repo/
#
#
#
# ===== for scp/ sftp/ rsync transfer you need to add an ssh private key
# ssh-privatekey = /opt/imlbackup/client/keys/id_imlbackup@storage-connector.iml.unibe.ch
#
# HINT: if using scp:// on Debian 8 enable ssh-backend; default: no value
# duplicity_ssh-backend = pexpect
# for local or locally mounted targets - you can add a test file that must be found
# to detect that a backup volume is mounted
# storage-file = /run/media/backup/I_am_mounted.txt
# OPTIONAL: register for a backup slot
# storage-register = ssh
# storage-registercmd = ./storage_helper.sh
# ----------------------------------------------------------------------
# BASIC settings
# ----------------------------------------------------------------------
# what tool to use? one of duplicity|restic ... see plugins/transfer/*.sh
bin = restic
# bin = duplicity
# encrypt backup sets with a password
# remark: "gnupg-passphrase = ..." is deprecated
passphrase = EnterYourSecretHere
# ----------------------------------------------------------------------
# backup type; one of auto|inc
# inc: incremetal and full backups if started on cofigured times
# auto: automatic; =incermental backups; duplicity can start a full
# backup if the last one is older a given range
# ----------------------------------------------------------------------
# type = inc
type = auto
# ----------------------------------------------------------------------
# scheduling for full backup
# type = inc only
# for inc and full you can set
# DOM:06,22 - days of month
# DOW:Mon,Fri - weekdays
# WDM:WDM:1st Fri - nth weekday in month
# ----------------------------------------------------------------------
# full = WDM:3rd Fri
# when to start a full backup?
# regex that must match a time HH:MM somewhen
# This will start it if backup ist started between 23:00:00 and 23:09:59
# start-time-full = 23:0.
# ----------------------------------------------------------------------
# full backups for type = auto AND when using duplicity
# ----------------------------------------------------------------------
# auto = <time> i.e. 1M
# auto = 1M
# automatic backup of samba shares (only if samba shares were detected)
sambashares = 1
restore-path = /restore
# ----------------------------------------------------------------------
#
# DUPLICITY
# values without prefix "duplicity_" are deprecated
#
# ----------------------------------------------------------------------
# for fallback on Debian 8:
# ssh-backend = pexpect
# duplicity_ssh-backend =
# time to keep backup sets on storage
# M - monthes
# Y - years
# keep = 6M
duplicity_keep = 6M
# volume size on backup target im MB
# volsize = 350
duplicity_volsize = 350
# use another cache directory than ~/.cache/duplicity/
# cachedir =
duplicity_cachedir =
# ----------------------------------------------------------------------
#
# RESTIC
#
# ----------------------------------------------------------------------
# use another cache directory than /root/.cache/restic
restic_cachedir =
restic_verbose = 2
restic_tag = imlbackup
restic_mountpoint = /mnt/restore
# prune
restic_keep-hourly = 100
restic_keep-daily = 90
restic_keep-weekly = 12
restic_keep-monthly = 12
restic_keep-yearly = 10
# ----------------------------------------------------------------------
Description
auto
Define when to make full backups for type = auto
. It starts incremental backups
only as long the last full backup is not older than the given range.
It is used for Duplicity only and forces the parameter --full-if-older-than [value]
.
Values are a number followed by a single letter for the time: s, m, h, D, W, M, or Y (indicating seconds, minutes, hours, days, weeks, months, or years respectively)
auto = 1M
bin
Name of the tool to use for file transfer.
The value is one of restic|duplicity
bin = restic
duplicity_*
Variables that are specific for duplicity. They will be used when you set bin = duplicity.
# for fallback on Debian 8:
# ssh-backend = pexpect
# duplicity_ssh-backend =
# time to keep backup sets on storage
# M - monthes
# Y - years
# keep = 6M
duplicity_keep = 6M
# volume size on backup target im MB
# volsize = 350
duplicity_volsize = 350
# use another cache directory than ~/.cache/duplicity/
# cachedir =
duplicity_cachedir =
full
Scheduling days for full backup You can set
- day of month: DOM
- weekday: DOW
- nth weekday in a month: WDM
It is followes by a :
and a single value - or multiple values delimited by ,
.
- Day of month is always a 2 digit value (01..31).
- Keywords for weekdays are Mon, Tue, Wed, Thu, Fri, Sat, Sun.
- Valid numbers of day are 1st, 2nd, 3rd, 4th, 5th followes by space and a weekday
Examples:
- DOM:06,22 - days of month
- DOW:Mon,Fri - weekdays
- WDM:1st Fri - nth weekday in month
full = WDM:3rd Fri
See also: start-time-full
passphrase
Passphrase to encrypt data locally before sending backup data to a target.
Keep your password on an additional (safe) place: without it you cannot restore any data anymore.
passphrase = EnterYourSecretHere
restic_*
Variables that are specific for restic. They will be used when you set bin = restic.
# use another cache directory than /root/.cache/restic
restic_cachedir =
restic_verbose = 2
restic_tag = imlbackup
restic_mountpoint = /mnt/restore
# prune
restic_keep-hourly = 100
restic_keep-daily = 90
restic_keep-weekly = 12
restic_keep-monthly = 12
restic_keep-yearly = 10
restore-path
Default path where to put restored file when running restore.sh.
After restore action you need to move/ copy the needed files to the wanted place.
restore-path = /restore
sambashares
If the backup is running on a server with installed samba all shares will be detected from /etc/samba/smb.conf and handled like a added directory in dirs.job
sambashares = 1
start-time-full
Time when to start an incrmental backup. This value will be handled if a day matches full only.
The value of start-time-full is a regex then must match a time HH:MM somewhen to start a full backup.
This will start it if backup ist started between 23:00:00 and 23:09:59:
start-time-full= 23:0.
see also full
type
Type of backup. The value is one of auto|inc
- inc: incremetal and full backups if started on cofigured times
- auto: automatic; =incermental backups; duplicity can start a full backup if the last one is older a given range
This setting depends on the possibilities of the used backup tool.
Restic
- set to "auto" only
Duplicity
Duplicity supports 2 modes.
-
"inc" - make full and incremental backups defined times. You need more values:
- full = WDM:3rd Fri
- start-time-full = 23:0.
-
"auto" - starts incremental backups as long last full backup is not older value in
- auto = 1M
type = auto
see also bin