2
0
Fork 0
This commit is contained in:
Ducky 2023-08-15 04:49:27 +01:00
parent 8d355454ef
commit 229cee2f31
7 changed files with 350 additions and 21 deletions

View file

@ -11,12 +11,13 @@ function restic_exec() {
args="${@:2}"
if [[ -z $command ]]; then
say_warn "No command specified. Not running."
say_warn "No command specified. Not running"
else
restic \
--password-file "$passwd_file" \
--repo "$repo" \
$command $args
say "Running restic!"
#restic \
# --password-file "$passwd_file" \
# --repo "$repo" \
# $command $args
fi
}
@ -25,13 +26,15 @@ function backup() {
args="${@:2}"
if [[ ! -d $path ]]; then
warn "'$path' does not exist. Not backing up."
say warning "'$path' does not exist. Not backing up"
else
for exclude in "${excludes[@]}"
do
args+=" --iexclude \"$exclude\""
done
say info "Backing up: $path"
#for exclude in "${excludes[@]}"
#do
# args+=" --iexclude \"$exclude\""
#done
restic_exec \
backup \
--iexclude "__MACOSX" \