-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
956 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
# ----------------------------------------------------------------------------- | ||
## | ||
# Default configuration for backup & restore related commands | ||
# | ||
# This file contains useful defaults to reduce amount of configuration work | ||
# needed in derived profiles. It should NOT contain a full backup config | ||
# with "source" definitions, since these whould be inherited by all backup | ||
# profiles that derive from "base" (or "default"). | ||
# | ||
# To define backup sources, create a profile config in "profiles.d" like: | ||
# | ||
# >>> "profiles.d/example.conf" | ||
# | ||
# [profiles.example] | ||
# description = "Backup example" | ||
# inherit = "base" | ||
# | ||
# [profiles.example.backup] | ||
# schedule = "daily" | ||
# source = [ | ||
# "/path/to/backup", | ||
# "/other/path/to/backup", | ||
# ] | ||
# | ||
# <<< | ||
# | ||
|
||
|
||
## | ||
# Backup defaults | ||
[profiles.default.backup] | ||
|
||
# Hostname to identify backup snapshots in the repository from this host | ||
{{ template "conf:default-host" . }} | ||
|
||
# | ||
# Tags (besides host & path) are used to identify snapshots belonging to | ||
# a certain backup. | ||
# | ||
# Multiple tags can be defined, but profile name should always be included, | ||
# the expression "{{ .Profile.Name }}" resolves to the currently active | ||
# profile name. | ||
# | ||
# Notes: | ||
# | ||
# - Set the same tags for "backup" and "retention" unless you know what you | ||
# are doing. Retention uses the tags defined in the backup section when | ||
# "tag = true" is set in the retention configuration and this default | ||
# setup should not be changed. | ||
# | ||
# - Most of the command sections should use "tag = true" to copy tags from | ||
# backup so that restore, mount, etc. relate to the selected profile. | ||
# | ||
tag = [ "{{ .Profile.Name }}" ] | ||
|
||
# Exclude known cache files & folders from backups | ||
exclude-caches = true | ||
|
||
# Exclude nested filesystems | ||
# Prefer overriding this option in dedicated backup profiles instead of | ||
# globally as it can greatly increase the volume if nested FS mounts are | ||
# contained in backup source paths. | ||
one-file-system = true | ||
|
||
# Toggle whether a failure in reading a backup source is considered an error | ||
no-error-on-warning = false | ||
|
||
# Wait on acquiring locks when running the profile on a schedule | ||
schedule-lock-wait = "45m" | ||
|
||
# Specify the user that runs profile tasks on a schedule | ||
# "system" - root runs the profile tasks | ||
# "user" - user that created the schedule runs the profile tasks | ||
schedule-permission = "system" | ||
|
||
# Toggle verbose output for troubleshooting | ||
#verbose = false | ||
|
||
# Toggles immediate repository check before and after backup. | ||
# Checks can be heavy on resources. Consider scheduling "maintenance" | ||
# (see "conf.d/check.conf") instead of enabling checks here. | ||
check-before = false | ||
check-after = false | ||
|
||
|
||
## | ||
# Snapshot retention defaults | ||
[profiles.default.retention] | ||
# Remove obsolete snapshots prior to starting a backup | ||
before-backup = false | ||
# Remove obsolete snapshots after a successful backup | ||
after-backup = true | ||
|
||
# | ||
# Note: Retention operates on host, path and tag filters to identify snapshots | ||
# to retain or remove. In most cases these filters should be in sync with | ||
# the backup configuration of a profile so that snapshots will be removed | ||
# that truely belong to a profile's backup. | ||
# | ||
|
||
# Host filter | ||
# Copying "host" block to identify snapshots by hostname | ||
{{ template "conf:default-host" . }} | ||
|
||
# Tag filter | ||
# Retention allows to build tag filter from backup with 'true'. It is strongly | ||
# advised not to change this as tags are the primary filter besides hostname. | ||
tag = true | ||
|
||
# Path filter | ||
# Set to "true" to copy source paths from backup, "false" or a list of paths | ||
# to disable or customize the path filter. | ||
# | ||
# Note: Path filters match literally on the absolute source paths recorded | ||
# when a snapshot was created. If sources are changed, specified relative or | ||
# with wildcards, snapshots may no longer be matched. Tag and host filters are | ||
# better suited to identify all snapshots of certain profile. | ||
path = false | ||
|
||
# Specify the snapshots to keep when checking for obsolete snapshots | ||
# Snapshots that do not match any condition are removed | ||
keep-tag = [ "forever" ] | ||
keep-last = 3 | ||
#keep-hourly = 1 | ||
#keep-daily = 1 | ||
#keep-weekly = 1 | ||
#keep-monthly = 1 | ||
#keep-yearly = 1 | ||
#keep-within = "30d" | ||
|
||
# Use compact format for listing snapshots | ||
#compact = false | ||
|
||
# Toggles immediate prune of the repository as snapshots are removed. | ||
# | ||
# While removing snapshots is a light operation, prune (reclaim space) can | ||
# be heavy on resources as it rewrites parts of the repository. | ||
# Consider scheduling "maintenance" (see "conf.d/prune.conf") instead of | ||
# enabling prune here. | ||
# | ||
# Also an attempt to recover a removed snapshot with "resticprofile recover" | ||
# only works as long as the repository was not yet pruned. | ||
prune = false | ||
|
||
|
||
## | ||
# Defaults for operations on repository snapshots of this host | ||
# Usage: | ||
# - "resticprofile snapshots" - view snapshots | ||
# - "resticprofile mount /mnt/restore" - mount snapshots | ||
# - "resticprofile ls latest /" - list files in a snapshot | ||
# - "resticprofile dump latest /file" - dump a file to stdout | ||
# - "resticprofile find PATTERN..." - find files in snapshots | ||
# - "resticprofile copy --repo2=..." - copy snapshots to repo2 | ||
# - "resticprofile restore --target=/to/dir --include=PATTERN... latest" | ||
[profiles.default.copy] | ||
{{ template "conf:default-host" . }} | ||
schedule-lock-wait = "1h30m" | ||
[profiles.default.dump] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.find] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.forget] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.ls] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.mount] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.restore] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.snapshots] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.stats] | ||
{{ template "conf:default-host" . }} | ||
[profiles.default.tag] | ||
{{ template "conf:default-host" . }} | ||
|
||
|
||
## | ||
# Setup operations on repository snapshots for profiles deriving from "base" | ||
# Usage: | ||
# - "resticprofile profileName.snapshots" - view snapshots | ||
# - "resticprofile profileName.mount /mnt/restore" - mount snapshots | ||
# - "resticprofile profileName.ls latest /" - list files in a snapshot | ||
# - "resticprofile profileName.dump latest /file" - dump a file to stdout | ||
# - "resticprofile profileName.find PATTERN..." - find files in snapshots | ||
# - "resticprofile profileName.copy --repo2=..." - copy snapshots to repo2 | ||
# - "resticprofile profileName.restore --target=/to/dir latest" | ||
[profiles.base.copy] | ||
tag = true | ||
[profiles.base.dump] | ||
tag = true | ||
[profiles.base.find] | ||
tag = true | ||
[profiles.base.forget] | ||
tag = true | ||
[profiles.base.ls] | ||
tag = true | ||
[profiles.base.mount] | ||
tag = true | ||
[profiles.base.restore] | ||
tag = true | ||
[profiles.base.snapshots] | ||
tag = true | ||
[profiles.base.stats] | ||
tag = true | ||
[profiles.base.tag] | ||
tag = true | ||
|
||
|
||
# ----------------------------------------------------------------------------- |
Oops, something went wrong.