|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ $AWS_RESTIC_BACKUP = 'no' ] && [ $RESTIC_SOURCE_FROM_FILE = 'no' ]; then
|
|
|
|
restic backup --verbose \
|
|
|
|
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
|
|
|
|
--exclude-caches \
|
|
|
|
--exclude-file="${RESTIC_EXCLUDES}" \
|
|
|
|
"${RESTIC_SOURCE}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $AWS_RESTIC_BACKUP = 'yes' ] && [ $RESTIC_SOURCE_FROM_FILE = 'no' ]; then
|
|
|
|
restic backup --verbose \
|
|
|
|
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
|
|
|
|
--exclude-caches \
|
|
|
|
--exclude-file="${RESTIC_EXCLUDES}" \
|
|
|
|
-o s3.connections="${AWS_CONNECTIONS}" \
|
|
|
|
--limit-upload "${AWS_UPLOAD}" \
|
|
|
|
"${RESTIC_SOURCE}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $AWS_RESTIC_BACKUP = 'no' ] && [ $RESTIC_SOURCE_FROM_FILE = 'yes' ]; then
|
|
|
|
restic backup --verbose \
|
|
|
|
--files-from "${SCRIPT_DIR}"/resticIncludes \
|
|
|
|
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
|
|
|
|
--exclude-caches \
|
|
|
|
--exclude-file="${RESTIC_EXCLUDES}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $AWS_RESTIC_BACKUP = 'yes' ] && [ $RESTIC_SOURCE_FROM_FILE = 'yes' ]; then
|
|
|
|
restic backup --verbose \
|
|
|
|
--files-from "${SCRIPT_DIR}"/resticIncludes \
|
|
|
|
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
|
|
|
|
--exclude-caches \
|
|
|
|
--exclude-file="${RESTIC_EXCLUDES}" \
|
|
|
|
-o s3.connections="${AWS_CONNECTIONS}" \
|
|
|
|
--limit-upload "${AWS_UPLOAD}"
|
|
|
|
fi
|