From 4707b0086767871dea6e92b273df58c4e00b216f Mon Sep 17 00:00:00 2001 From: Ducky Date: Mon, 21 Aug 2023 17:26:35 +0100 Subject: [PATCH] sh.zio.backup: add fixed time to backups --- usr/local/bin/sh.zio.backup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 302b7db..e94339d 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -11,6 +11,7 @@ backup_scripts_dir="$(get_config_dir "sh.zio.backup")/scripts" cache_dir="/var/cache/sh.zio.backup/restic" secrets_dir="$(get_config_dir "sh.zio.backup")/secrets" host="$(hostname -s)" +now="$(date +"%Y-%m-%d %H:%M:%S")" restic_path="" restic_repo_file="$secrets_dir/restic-repo" restic_repo_passwd_file="$secrets_dir/restic-repo-passwd" @@ -88,6 +89,7 @@ function invoke_script() { export -f get_config_dir export -f get_real_path export -f invoke_restic + export -f now export -f podman_exec export -f prune_backup export -f say @@ -138,6 +140,7 @@ function backup_dir() { --host "$host" \ --tag "$me_filename" \ --tag "$(basename "$0")" \ + --time "$now" \ $args "$path" fi }