From e2ace09cc145ef1e578a73ad49ce559a5a14fe2a Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Wed, 18 Dec 2024 14:03:40 -0500 Subject: [PATCH] Updated profile template to include better defaults Added forget default directive, and offsite forget options. --- templates/profiles.toml | 68 +++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/templates/profiles.toml b/templates/profiles.toml index 88b0400..8a0fe30 100644 --- a/templates/profiles.toml +++ b/templates/profiles.toml @@ -43,6 +43,41 @@ version = "1" AWS_ACCESS_KEY_ID = "FIXME" AWS_SECRET_ACCESS_KEY = "FIXME" + [default.forget] + keep-hourly = 2 + keep-daily = 14 + keep-weekly = 26 + keep-monthly = 12 + keep-within = "3h" + keep-tag = [ "forever" ] + compact = true + prune = true + # host can be a boolean ('true' meaning current hostname) + # or a string to specify a different hostname + host = true + + # retention policy for profile home + # retention is a special section that run the "forget" command + # before or after a backup + [default.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" ] + compact = false + 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 + # New profile named 'home' [system] inherit = "default" @@ -82,7 +117,8 @@ version = "1" # Copy to Borgbase: run-after = [ "/etc/resticprofile/scripts/os after", - "resticprofile system.copy" + "resticprofile system.copy", + "resticprofile borgbase.forget" ] # On Failure: run-fail = [ @@ -95,27 +131,6 @@ version = "1" 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" @@ -130,7 +145,14 @@ version = "1" lock = "/tmp/resticprofile-system.copy.lock" [borgbase] - #inherit = "home" inherit = "default" initialize = false repository = "rest:https://FIXME.repo.borgbase.com" + + [borgbase.copy] + after-backup = true + initialize = false + initialize-copy-chunker-params = true + repository = "rest:https://FIXME.repo.borgbase.com" + password-file = "key" + lock = "/tmp/resticprofile-system.copy.lock"