various
This commit is contained in:
parent
8d355454ef
commit
229cee2f31
7 changed files with 350 additions and 21 deletions
|
|
@ -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" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue