more logging
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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>/'${BACKUP_ID}'/' /.duplicacy/preferences
|
||||
sed --debug --in-place 's/<PROTOCOL>/'${PROTOCOL}'/' /.duplicacy/preferences
|
||||
sed --debug --in-place 's/<SSH_USERNAME>/'${SSH_USERNAME}'/' /.duplicacy/preferences
|
||||
sed --debug --in-place 's/<SSH_PASSWORD>/'${SSH_PASSWORD}'/' /.duplicacy/preferences
|
||||
sed --debug --in-place 's/<BACKUP_SERVER>/'${BACKUP_SERVER}'/' /.duplicacy/preferences
|
||||
sed --debug --in-place 's/<SSH_PORT>/'${SSH_PORT}'/' /.duplicacy/preferences
|
||||
sed --debug s--in-place 's~<BACKUP_SERVER_PATH>~'${BACKUP_SERVER_PATH}'~' /.duplicacy/preferences
|
||||
bashio::log.info "Creating /.duplicacy/preferences file..."
|
||||
sed --in-place 's/<BACKUP_ID>/'${BACKUP_ID}'/' /.duplicacy/preferences
|
||||
sed --in-place 's/<PROTOCOL>/'${PROTOCOL}'/' /.duplicacy/preferences
|
||||
sed --in-place 's/<SSH_USERNAME>/'${SSH_USERNAME}'/' /.duplicacy/preferences
|
||||
sed --in-place 's/<SSH_PASSWORD>/'${SSH_PASSWORD}'/' /.duplicacy/preferences
|
||||
sed --in-place 's/<BACKUP_SERVER>/'${BACKUP_SERVER}'/' /.duplicacy/preferences
|
||||
sed --in-place 's/<SSH_PORT>/'${SSH_PORT}'/' /.duplicacy/preferences
|
||||
sed --in-place 's~<BACKUP_SERVER_PATH>~'${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 {} \;
|
||||
Reference in New Issue
Block a user