introduce dropbox functionality

This commit is contained in:
Matthias Voppichler 2018-01-31 22:34:06 +01:00
parent 734be37b6d
commit 18ef8983aa
2 changed files with 18 additions and 0 deletions

View file

@ -115,6 +115,7 @@ DEST="s3+http://foobar-backup-bucket/backup-folder/"
#DEST="webdav[s]://user[:password]@other.host[:port]/some_dir"
#DEST="gdocs://foobar_google_account/some_dir"
#DEST="swift://foobar_swift_container/some_dir"
#DEST="dpbx:///foobar_swift_container/some_dir"
#DEST="b2://some_account_id[:some_application_key]@some_bucket_name/some_dir"
@ -174,6 +175,13 @@ DEST="s3+http://foobar-backup-bucket/backup-folder/"
#SWIFT_AUTHURL="foobar_swift_authurl"
#SWIFT_AUTHVERSION="2"
# ------------------------------------------------------------------------------
# DROPBOX INFORMATION
# ------------------------------------------------------------------------------
# Uncomment these lines if you're using Dropbox
#
#DPBX_ACCESS_TOKEN="foobar_dropbox_access_token"
# ------------------------------------------------------------------------------
# INCLUDE LIST OF DIRECTORIES

View file

@ -354,6 +354,7 @@ export SWIFT_USERNAME
export SWIFT_PASSWORD
export SWIFT_AUTHURL
export SWIFT_AUTHVERSION
export DPBX_ACCESS_TOKEN
export PASSPHRASE
export SIGN_PASSPHRASE
@ -448,6 +449,12 @@ else
DEST_IS_S3=false
fi
if [ "$(echo "${DEST}" | cut -c 1,4)" = "dpbx" ]; then
DEST_IS_DPBX=true
else
DEST_IS_DPBX=false
fi
if [ "$(echo "${DEST}" | cut -c 1,2)" = "b2" ]; then
DEST_IS_B2=true
B2CMD="$(which b2)"
@ -481,6 +488,8 @@ check_variables ()
config_sanity_fail "An s3 DEST has been specified, but AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY have not been configured"
[[ ( ${DEST_IS_GS} = true && (${GS_ACCESS_KEY_ID} = "foobar_gcs_key_id" || ${GS_SECRET_ACCESS_KEY} = "foobar_gcs_secret_id" )) ]] && \
config_sanity_fail "A Google Cloud Storage DEST has been specified, but GS_ACCESS_KEY_ID or GS_SECRET_ACCESS_KEY have not been configured"
[[ ( ${DEST_IS_DPBX} = true && (${DPBX_ACCESS_TOKEN} = "foobar_dropbox_access_token" )) ]] && \
config_sanity_fail "A Dropbox DEST has been specified, but DPBX_ACCESS_TOKEN has not been configured"
[[ ! -z "${INCEXCFILE}" && ! -f ${INCEXCFILE} ]] && config_sanity_fail "The specified INCEXCFILE ${INCEXCFILE} does not exists"
}
@ -1151,6 +1160,7 @@ unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset GS_ACCESS_KEY_ID
unset GS_SECRET_ACCESS_KEY
unset DPBX_ACCESS_TOKEN
unset PASSPHRASE
unset SIGN_PASSPHRASE
unset FTP_PASSWORD