diff --git a/PBS-Client/config.json b/PBS-Client/config.json index c1db543..491690b 100644 --- a/PBS-Client/config.json +++ b/PBS-Client/config.json @@ -12,6 +12,7 @@ "options": { "pbs_host": "", "pbs_port": "8007", + "pbs_fingerprint": "", "username": "", "password": "", "auth": "pam or pbs", @@ -32,6 +33,7 @@ "datastore": "str", "pbs_host": "str", "pbs_port": "int", + "pbs_fingerprint": "str", "auth": ["match(pam|pbs)"], "namespace": "str", "days_to_keep": "int", diff --git a/PBS-Client/run.sh b/PBS-Client/run.sh index 7fe0a89..17dcba7 100644 --- a/PBS-Client/run.sh +++ b/PBS-Client/run.sh @@ -7,6 +7,7 @@ USERNAME=$(bashio::config 'username') PASSWORD=$(bashio::config 'password') PBS_HOST=$(bashio::config 'pbs_host') PBS_PORT=$(bashio::config 'pbs_port') +PBS_FINGERPRINT=$(bashio::config 'pbs_fingerprint') DATASTORE=$(bashio::config 'datastore') NAMESPACE=$(bashio::config 'namespace') INCLUDE=$(bashio::config 'include') @@ -14,6 +15,7 @@ DAYS_TO_KEEP=$(bashio::config 'days_to_keep') bashio::log.info "PBS_HOST set to ${PBS_HOST}" bashio::log.info "PBS_PORT set to ${PBS_PORT}" +bashio::log.info "PBS_FINGERPRINT set to ${PBS_FINGERPRINT}" bashio::log.info "DATASTORE set to ${DATASTORE}" bashio::log.info "NAMESPACE set to ${NAMESPACE}" bashio::log.info "USERNAME set to ${USERNAME}" @@ -42,12 +44,13 @@ bashio::log.info "DAYS_TO_KEEP set to ${DAYS_TO_KEEP}" bashio::log.info "Setting environment variables" export PBS_PASSWORD="${PASSWORD}" export PBS_REPOSITORY="${USERNAME}@${AUTH}@${PBS_HOST}:${PBS_PORT}:${DATASTORE}" +export PBS_FINGERPRINT="${PBS_FINGERPRINT}" bashio::log.info "PBS_REPOSITORY set to ${PBS_REPOSITORY}" INCLUDE_DEV="" for I in ${INCLUDE}; do - INCLUDE_DEV+="--include-dev ${I} " + INCLUDE_DEV+="${I}.pxar:/${I}" done bashio::log.info "INCLUDE_DEV set to ${INCLUDE_DEV}" @@ -58,9 +61,9 @@ exit 0 # run the backup bashio::log.info "Running the PBS backup..." if [ -z "${NAMESPACE}" ]; then - /usr/bin/proxmox-backup-client backup root.pxar:/ ${INCLUDE_DEV} + /usr/bin/proxmox-backup-client backup ${INCLUDE_DEV} else - /usr/bin/proxmox-backup-client backup root.pxar:/ --ns ${NAMESPACE} ${INCLUDE_DEV} + /usr/bin/proxmox-backup-client backup --ns ${NAMESPACE} ${INCLUDE_DEV} fi # run the clean up