diff --git a/duplicacy/config.json b/duplicacy/config.json index 896f4f9..6661265 100644 --- a/duplicacy/config.json +++ b/duplicacy/config.json @@ -1,6 +1,6 @@ { "name": "duplicacy", - "version": "20210720.9", + "version": "20210720.10", "slug": "duplicacy", "description": "Duplicacy backup", "url": "https://git.johnhgaunt.com/jgaunt/hassio-addons/src/branch/master/duplicacy", diff --git a/duplicacy/run.sh b/duplicacy/run.sh index 2c8038b..9e5789e 100644 --- a/duplicacy/run.sh +++ b/duplicacy/run.sh @@ -23,20 +23,23 @@ bashio::log.info "FILTERS set to ${FILTERS}." bashio::log.info "DAYS_TO_KEEP set to ${DAYS_TO_KEEP}." # edit the /.duplicacy/preferences file -bashio::log.info "Creating /.duplicacy preferences file..." -sed --debug --in-place 's//'${BACKUP_ID}'/' /.duplicacy/preferences -sed --debug --in-place 's//'${PROTOCOL}'/' /.duplicacy/preferences -sed --debug --in-place 's//'${SSH_USERNAME}'/' /.duplicacy/preferences -sed --debug --in-place 's//'${SSH_PASSWORD}'/' /.duplicacy/preferences -sed --debug --in-place 's//'${BACKUP_SERVER}'/' /.duplicacy/preferences -sed --debug --in-place 's//'${SSH_PORT}'/' /.duplicacy/preferences -sed --debug s--in-place 's~~'${BACKUP_SERVER_PATH}'~' /.duplicacy/preferences +bashio::log.info "Creating /.duplicacy/preferences file..." +sed --in-place 's//'${BACKUP_ID}'/' /.duplicacy/preferences +sed --in-place 's//'${PROTOCOL}'/' /.duplicacy/preferences +sed --in-place 's//'${SSH_USERNAME}'/' /.duplicacy/preferences +sed --in-place 's//'${SSH_PASSWORD}'/' /.duplicacy/preferences +sed --in-place 's//'${BACKUP_SERVER}'/' /.duplicacy/preferences +sed --in-place 's//'${SSH_PORT}'/' /.duplicacy/preferences +sed --in-place 's~~'${BACKUP_SERVER_PATH}'~' /.duplicacy/preferences # create the filters file +bashio::log.info "Creating /.duplicacy/filters file..." echo ${FILTERS} | jq -r '.[]' >> /.duplicacy/filters # run the backup +bashio::log.info "Running the duplicacy backup..." /duplicacy -verbose -log backup -stats # run the clean up +bashio::log.info "Cleaing up backups older than ${DAYS_TO_KEEP} day(s)..." find /backup/* -type f -name '*.tar' -mtime +${DAYS_TO_KEEP} -exec rm -vf {} \; \ No newline at end of file