Push back

This commit is contained in:
Michael Stanclift 2020-07-10 23:15:28 -05:00
parent a284d3b4d2
commit 87f1a0fd37
2 changed files with 20 additions and 2 deletions

View File

@ -7,6 +7,8 @@ A new function `./gravity-sync.sh backup` will now perform a sqlite operated bac
By default, 7 days worth of backups will be retained in the `backup` folder. You can adjust the retention length by changing the `BACKUP_RETAIN` function in your `gravity-sync.conf` file. See the `ADVANCED.md` file for more information on setting these custom configuration options.
There are also enhancements to the `./gravity-sync.sh restore` function, where as previously this task would only restore the previous copy of the database that is made during sync operations, now this will ask you to select a previous backup copy (by date) and will use that file to restore. This will stop the Pi-hole services on the local server while the task is completed. You will now also be prompted to perform a push operation of the restored database to the primary Pi-hole server.
## 2.0
### The Smart Release

View File

@ -662,8 +662,24 @@ function restore_gs {
${PIHOLE_BIN} restartdns reloadlists >/dev/null 2>&1
error_validate
logs_export
exit_withchange
MESSAGE="Do you want to push the restored configuration to the primary Pi-hole? (yes/no)"
echo_need
read PUSH_TO_PRIMARY
if [ "${PUSH_TO_PRIMARY}" == "Yes" ] || [ "${PUSH_TO_PRIMARY}" == "yes" ] || [ "${PUSH_TO_PRIMARY}" == "Y" ] || [ "${PUSH_TO_PRIMARY}" == "y" ]
then
push_gs
elif [ "${PUSH_TO_PRIMARY}" == "No" ] || [ "${PUSH_TO_PRIMARY}" == "no" ] || [ "${PUSH_TO_PRIMARY}" == "N" ] || [ "${PUSH_TO_PRIMARY}" == "n" ]
logs_export
exit_withchange
else
MESSAGE="Invalid Selection - Defaulting No"
echo_warn
logs_export
exit_withchange
fi
}
# Logging Functions