2
0
Fork 0

sh.zio.backup: add get_dump_dir()

main
Ducky 2023-08-22 02:29:47 +01:00
parent 0451746b3b
commit 47b75833e6
1 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,7 @@ function invoke_script() {
export -f die
export -f forget_backup
export -f get_config_dir
export -f get_dump_dir
export -f get_real_path
export -f invoke_restic
export -f podman_exec
@ -179,6 +180,13 @@ function prune_backup() {
--dry-run
}
function get_dump_dir() {
service="$1"
dumps_dir="/srv/dumps/$host/$service/$(date +"%Y%m%d%H%M%S")"
mkdir -p "$dumps_dir"
[[ $? == "0" ]] && echo "$dumps_dir"
}
function start_service() {
service="$1"