distribution/packages/sysutils/rclone/sources/cloud_backup

17 lines
484 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020-present Fewtarius
CONFIGPATH="/storage/.config"
if [ -e "${CONFIGPATH}/rsync.conf" ]
then
source ${CONFIGPATH}/rsync.conf
else
MOUNTPATH="/storage/cloud"
SYNCPATH="GAMES"
BACKUPPATH="/storage/roms"
fi
2022-04-03 16:56:40 +00:00
rclonectl mount ${MOUNTPATH} >/var/log/backup.log 2>&1
rsync -raiv --include-from="${CONFIGPATH}/rsync-rules.conf" --prune-empty-dirs ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ >>/var/log/backup.log 2>&1