DRY the sync backup script
This commit is contained in:
parent
0e1586e6f2
commit
505e36e868
1 changed files with 4 additions and 2 deletions
|
|
@ -6,7 +6,9 @@ IFS=$'\n\t'
|
|||
export BORG_REPO="/media/backup/"
|
||||
|
||||
if [ "$1" = "service" ]; then
|
||||
rclone sync "${BORG_REPO}" gdrive-backup:hot-repo/
|
||||
extra_args=()
|
||||
else
|
||||
rclone sync --progress "${BORG_REPO}" gdrive-backup:hot-repo/
|
||||
extra_args=(--progress)
|
||||
fi
|
||||
|
||||
rclone sync "${extra_args[@]}" "${BORG_REPO}" gdrive-backup:hot-repo/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue