diff --git a/remote-backup/CHANGELOG.md b/remote-backup/CHANGELOG.md index 361324b..419162e 100644 --- a/remote-backup/CHANGELOG.md +++ b/remote-backup/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2022.12.1 + +- Fix `scp: dest open` double quoting issue #86 addresses #84 +- Correct null behavior #85 addresses #81 +- Bump Base Image to 13.0.1 + +**Full Changelog**: https://github.com/ikifar2012/remote-backup-addon/compare/2022.12.0...2022.12.1 + # 2022.12.0 - Bump Base Image to 13.0.0 diff --git a/remote-backup/config.yaml b/remote-backup/config.yaml index 7d8205b..ebd0318 100644 --- a/remote-backup/config.yaml +++ b/remote-backup/config.yaml @@ -1,5 +1,5 @@ name: Remote Backup -version: "2022.12.0" +version: "2022.12.1" slug: remote_backup description: Automatically create and transfer HA backups using SFTP (SCP), rsync, or rclone (experimental) image: ikifar/remote-backup-{arch} diff --git a/remote-backup/run.sh b/remote-backup/run.sh index edcc0b2..8f7a33f 100755 --- a/remote-backup/run.sh +++ b/remote-backup/run.sh @@ -124,7 +124,7 @@ function create-local-backup { local unformatted_folders="${base_folders}" local unformatted_addons=$(bashio::supervisor.addons) - + if bashio::config.has_value "backup_exclude_folders"; then local -r backup_exclude_folders=$(bashio::config "backup_exclude_folders") bashio::log.notice "Excluded folder(s):\n${backup_exclude_folders}" @@ -179,10 +179,10 @@ function copy-backup-to-remote { bashio::log.info "Copying backup using SFTP/SCP." ( sshpass -p "${REMOTE_PASSWORD}" \ - scp ${DEBUG_FLAG:-} -s -F "${SSH_HOME}/config" "/backup/${SLUG}.tar" remote:"\"${remote_directory}/${remote_name}.tar\"" || ( + scp ${DEBUG_FLAG:-} -F "${SSH_HOME}/config" "/backup/${SLUG}.tar" remote:"${remote_directory}/${remote_name}.tar" || ( bashio::log.warning "SFTP transfer failed, falling back to SCP: $(sshpass_error $?)" sshpass -p "${REMOTE_PASSWORD}" \ - scp ${DEBUG_FLAG:-} -O -F "${SSH_HOME}/config" "/backup/${SLUG}.tar" remote:"\"${remote_directory}/${remote_name}.tar\"" || ( + scp ${DEBUG_FLAG:-} -O -F "${SSH_HOME}/config" "/backup/${SLUG}.tar" remote:"${remote_directory}/${remote_name}.tar" || ( bashio::log.error "Error copying backup ${SLUG}.tar to ${remote_directory} on ${REMOTE_HOST}: $(sshpass_error $?)" return "${__BASHIO_EXIT_NOK}" ) @@ -286,7 +286,7 @@ function clone-to-remote { } function delete-local-backup { - if bashio::config.equals "backup_keep_local" "all" || bashio::config.equals "backup_keep_local" "null"; then + if bashio::config.equals "backup_keep_local" "all"; then bashio::log.debug "Keep all backups." return "${__BASHIO_EXIT_OK}" fi @@ -295,7 +295,7 @@ function delete-local-backup { bashio::log.warning "Failed to reload backups!" fi - if bashio::config.is_empty "backup_keep_local"; then + if bashio::config.is_empty "backup_keep_local" || bashio::config.equals "backup_keep_local" "null" || bashio::config.equals "keep_backup_local" "0"; then if bashio::var.has_value "$SLUG"; then bashio::log.notice "Deleting local backup: ${SLUG}" if ! bashio::api.supervisor DELETE /backups/${SLUG}; then