sh.zio.backup: add get_dump_dir()
parent
0451746b3b
commit
47b75833e6
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue