diff --git a/backup.sh b/backup.sh index 0a78d2b..897230e 100755 --- a/backup.sh +++ b/backup.sh @@ -24,13 +24,13 @@ tar -cjf ${backup_dir}/conf/${DATE}.tbz2 openhab.conf # openHAB conf -tar -C data -cjf ${backup_dir}/data/conf/${DATE}.tbz2 conf +tar -C ${SCRIPT_DIR}/data -cjf ${backup_dir}/data/conf/${DATE}.tbz2 conf # openHAB addons -tar -C data -cjf ${backup_dir}/data/addons/${DATE}.tbz2 addons +tar -C ${SCRIPT_DIR}/data -cjf ${backup_dir}/data/addons/${DATE}.tbz2 addons # openHAB userdata -tar -C data -cjf ${backup_dir}/data/userdata/${DATE}.tbz2 userdata +tar -C ${SCRIPT_DIR}/data --exclude='userdata/backup' --exclude='userdata/logs' -cjf ${backup_dir}/data/userdata/${DATE}.tbz2 userdata # delete all files older 30 days find ${backupDir} -iname "*.tbz2" -type f -mtime +30 -exec rm {} \; > /dev/null