sh.zio.backup: add fixed time to backups
parent
77ceaacd30
commit
4707b00867
|
@ -11,6 +11,7 @@ backup_scripts_dir="$(get_config_dir "sh.zio.backup")/scripts"
|
||||||
cache_dir="/var/cache/sh.zio.backup/restic"
|
cache_dir="/var/cache/sh.zio.backup/restic"
|
||||||
secrets_dir="$(get_config_dir "sh.zio.backup")/secrets"
|
secrets_dir="$(get_config_dir "sh.zio.backup")/secrets"
|
||||||
host="$(hostname -s)"
|
host="$(hostname -s)"
|
||||||
|
now="$(date +"%Y-%m-%d %H:%M:%S")"
|
||||||
restic_path=""
|
restic_path=""
|
||||||
restic_repo_file="$secrets_dir/restic-repo"
|
restic_repo_file="$secrets_dir/restic-repo"
|
||||||
restic_repo_passwd_file="$secrets_dir/restic-repo-passwd"
|
restic_repo_passwd_file="$secrets_dir/restic-repo-passwd"
|
||||||
|
@ -88,6 +89,7 @@ function invoke_script() {
|
||||||
export -f get_config_dir
|
export -f get_config_dir
|
||||||
export -f get_real_path
|
export -f get_real_path
|
||||||
export -f invoke_restic
|
export -f invoke_restic
|
||||||
|
export -f now
|
||||||
export -f podman_exec
|
export -f podman_exec
|
||||||
export -f prune_backup
|
export -f prune_backup
|
||||||
export -f say
|
export -f say
|
||||||
|
@ -138,6 +140,7 @@ function backup_dir() {
|
||||||
--host "$host" \
|
--host "$host" \
|
||||||
--tag "$me_filename" \
|
--tag "$me_filename" \
|
||||||
--tag "$(basename "$0")" \
|
--tag "$(basename "$0")" \
|
||||||
|
--time "$now" \
|
||||||
$args "$path"
|
$args "$path"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue