Fixed gitignore for templates

This commit is contained in:
Eric Renfro 2024-09-01 10:59:17 -04:00
parent 5237a96ddb
commit e1c2c89ebc
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
3 changed files with 142 additions and 0 deletions

2
.gitignore vendored
View file

@ -9,3 +9,5 @@ config/sysrescue/build_into_srm/root/*
profiles.toml profiles.toml
key key
excludes excludes
!templates/*

4
templates/excludes Normal file
View file

@ -0,0 +1,4 @@
/var/log/journal
/var/log/*.gz
/var/log/*.bz2
/var/log/*.xz

136
templates/profiles.toml Normal file
View file

@ -0,0 +1,136 @@
version = "1"
[global]
# ionice is available on Linux only
ionice = false
ionice-class = 2
ionice-level = 6
# priority is using priority class on windows, and "nice" on unixes
priority = "low"
# run 'snapshots' when no command is specified when invoking resticprofile
default-command = "snapshots"
# initialize a repository if none exist at location
initialize = false
# resticprofile won't start a profile if there's less than 100MB of RAM available
min-memory = 100
# a group is a profile that will call all profiles one by one
[groups]
# when starting a backup on profile "full-backup",
# it will run the "system" backup profile
full-backup = [ "system" ]
# Default profile when not specified on the command line (-n or --name)
# There's no default inheritance from the 'default' profile,
# you can use the 'inherit' flag if needed
[default]
# you can use a relative path, it will be relative to the configuration file
repository = "s3:http://mega.home.ld:9000/vm-backups/FIXME/"
#insecure-tls = true
password-file = "key"
initialize = false
# will run these scripts before and after each command (including 'backup')
#run-before = "mount /backup"
#run-after = "umount /backup"
# if a restic command fails, the run-after won't be running
# add this parameter to run the script in case of a failure
#run-after-fail = "umount /backup"
# add environment variables
[default.env]
TMPDIR = "/tmp"
AWS_DEFAULT_REGION = "ca-east-1"
AWS_ACCESS_KEY_ID = "FIXME"
AWS_SECRET_ACCESS_KEY = "FIXME"
# New profile named 'home'
[system]
inherit = "default"
initialize = false
# LOCAL lockfile so you cannot run the same profile more than once at a time
# (it's totally independent of the restic locks on the repository)
#lock = "/tmp/resticprofile-home.lock"
# 'backup' command of profile 'home'
[system.backup]
# files with no path are relative to the configuration file
exclude-file = [ "excludes" ]
exclude-if-present = [ ".nobackup" ]
exclude-caches = true
one-file-system = false
tag = [ "system" ]
source = [
"/root",
"/etc",
"/var/log",
"/usr/local",
"/var/spool/cron",
"/var/backups",
"/srv",
"/opt"
]
# ignore restic warnings when files cannot be read
no-error-on-warning = true
# run every day at midnight
schedule = "03:00"
schedule-permission = "system"
schedule-lock-wait = "2h"
# System Scripts
run-before = [
"/etc/resticprofile/scripts/os before"
]
# Copy to Borgbase:
run-after = [
"/etc/resticprofile/scripts/os after",
"resticprofile system.copy"
]
# On Failure:
run-fail = [
"/etc/resticprofile/scripts/os fail"
]
# Clean up:
run-finally = [
"/etc/resticprofile/scripts/os final"
]
lock = "/tmp/resticprofile-system.backup.lock"
# retention policy for profile home
# retention is a special section that run the "forget" command
# before or after a backup
[system.retention]
before-backup = false
after-backup = true
keep-hourly = 2
keep-daily = 14
keep-weekly = 26
keep-monthly = 12
keep-within = "3h"
keep-tag = [ "forever" ]
prune = false
# tag can be a boolean ('true' meaning to copy tag set from 'backup')
# or a custom set of tags.
# Default is 'false', meaning that tags are NOT used.
tag = true
# host can be a boolean ('true' meaning current hostname)
# or a string to specify a different hostname
host = true
[system.prune]
schedule = "Sun 05:00"
schedule-permission = "system"
schedule-lock-wait = "2h"
[system.copy]
after-backup = true
initialize = true
initialize-copy-chunker-params = true
repository = "rest:https://FIXME.repo.borgbase.com"
password-file = "key"
lock = "/tmp/resticprofile-system.copy.lock"
[borgbase]
#inherit = "home"
inherit = "default"
initialize = false
repository = "rest:https://FIXME.repo.borgbase.com"