dist file

# ----------------------------------------------------------------------
#
# jobfile for directories:
# - which directories you want to backup
#
# ----------------------------------------------------------------------
#
# SYNTAX: 
# [variable] = [value]
#
# - variable must start in first column
# - char "=" must be surrounded by space
# - value - any string; no " needed
#
# ----------------------------------------------------------------------


# ----------------------------------------------------------------------
# directory list to transfer
# without ending "/"
# missing directories on a system will be ignored
# ----------------------------------------------------------------------

# --- /etc ... just in case
include = /etc

# --- system logs
include = /var/log

# --- user homes
include = /home

# --- web folder
include = /var/www


# ----------------------------------------------------------------------
# excludes
# see duplicity ... added as -exclude-regex parameter
# ----------------------------------------------------------------------

# exclude = .*\.(swp|tmp)

# mac file
# exclude = \.DS_Store

# all files below a dir named "cache"
# exclude = /cache/.*
# exclude = /.cache/.*
# exclude = local/share/Trash/*
# exclude = /tmp/.*


# ----------------------------------------------------------------------

Description

include

Add a directory to backup with a single line per directory.

include = /etc

exclude

Add a exclude pattern. You can use multiple lines. If it is a lobbing ore a regex depends on the used backup tool.

Hint:

Finally do not spend time with defining exact exludes… better to backup all files of defined include rules and add some “trash” to the backup instead of missing files because of a wrong exclude pattern.

exclude = /tmp/.*

Hints for MS Windows

To define folders to backup you should not use the bash unix like notation with forward slash eg. /c/your/path. There seems to be a bug in restic to show snapshots on MS Windows written with /. https://github.com/restic/restic/issues/2397

Use the backslash - and quote it, eg:

include = c:\\backup
include = c:\\inetpub
include = c:\\scripts
include = c:\\Users

TODO: custom single dirs with includes and exludes

TODO.