Added ability to limit AWS upload speed and connections

release/full-rewrite
capntack 8 months ago
parent d56eae2e3b
commit 815d878c03

@ -1,9 +1,23 @@
#!/bin/bash #!/bin/bash
restic backup --verbose \ if [ AWS_RESTIC_BACKUP = 'no' ]; then
restic backup --verbose \
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \ --tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
--exclude-caches \ --exclude-caches \
--exclude-file="${RESTIC_EXCLUDES}" \ --exclude-file="${RESTIC_EXCLUDES}" \
--exclude "${SCRIPT_DIR}"/variables.sh \ --exclude "${SCRIPT_DIR}"/variables.sh \
--exclude "${SCRIPT_DIR}"/variablesAWS.sh \ --exclude "${SCRIPT_DIR}"/variablesAWS.sh \
"${RESTIC_SOURCE}" "${RESTIC_SOURCE}"
fi
if [ AWS_RESTIC_BACKUP = 'yes' ]; then
restic backup --verbose \
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
--exclude-caches \
--exclude-file="${RESTIC_EXCLUDES}" \
--exclude "${SCRIPT_DIR}"/variables.sh \
--exclude "${SCRIPT_DIR}"/variablesAWS.sh \
-o s3.connections="${AWS_CONNECTIONS}" \
--limit-upload "${AWS_UPLOAD}" \
"${RESTIC_SOURCE}"
fi

@ -14,6 +14,8 @@
export RESTIC_REPOSITORY='/path/to/repo' export RESTIC_REPOSITORY='/path/to/repo'
export AWS_ACCESS_KEY_ID='KEY-ID' export AWS_ACCESS_KEY_ID='KEY-ID'
export AWS_SECRET_ACCESS_KEY='SECRET-KEY' export AWS_SECRET_ACCESS_KEY='SECRET-KEY'
# readonly AWS_CONNECTIONS='2'
# readonly AWS_UPLOAD='2440'
export RESTIC_PASSWORD='PASSWORD' export RESTIC_PASSWORD='PASSWORD'
readonly RESTIC_SOURCE='/path/to/dir/to/backup' readonly RESTIC_SOURCE='/path/to/dir/to/backup'

@ -79,6 +79,8 @@ readonly LOG_RETENTION='30'
## Only set these if backing up to a compatible repo ## Only set these if backing up to a compatible repo
# export AWS_ACCESS_KEY_ID='KEY-ID' # export AWS_ACCESS_KEY_ID='KEY-ID'
# export AWS_SECRET_ACCESS_KEY='SECRET-KEY' # export AWS_SECRET_ACCESS_KEY='SECRET-KEY'
# readonly AWS_CONNECTIONS='2'
# readonly AWS_UPLOAD='2440'
## Set these for all restic configurations ## Set these for all restic configurations
# export RESTIC_REPOSITORY='/path/to/repo' # export RESTIC_REPOSITORY='/path/to/repo'

Loading…
Cancel
Save