This commit is contained in:
Michael Stanclift 2020-07-10 21:43:05 -05:00
parent 23a6ceed3a
commit 248536417b
4 changed files with 22 additions and 4 deletions

View File

@ -14,8 +14,8 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync
```bash ```bash
cd ~ cd ~
wget https://github.com/vmstan/gravity-sync/archive/v2.0.2.zip wget https://github.com/vmstan/gravity-sync/archive/v2.1.0.zip
unzip v2.0.2.zip -d gravity-sync unzip v2.1.0.zip -d gravity-sync
cd gravity-sync cd gravity-sync
``` ```

View File

@ -1,5 +1,10 @@
# The Changelog # The Changelog
## 2.1
### The Backup Release
A new function `./gravity-sync.sh backup` will now perform a sqlite operated backup of the `gravity.db` on the local Pi-hole.
## 2.0 ## 2.0
### The Smart Release ### The Smart Release

View File

@ -1 +1 @@
2.0.2 2.1.0

View File

@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS
# GRAVITY SYNC BY VMSTAN ##################### # GRAVITY SYNC BY VMSTAN #####################
PROGRAM='Gravity Sync' PROGRAM='Gravity Sync'
VERSION='2.0.2' VERSION='2.1.0'
# Execute from the home folder of the user who owns it (ex: 'cd ~/gravity-sync') # Execute from the home folder of the user who owns it (ex: 'cd ~/gravity-sync')
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync # For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
@ -1605,6 +1605,15 @@ function task_invalid {
list_gs_arguments list_gs_arguments
} }
## Backup Task
function task_backup {
TASKTYPE='BACKUP'
MESSAGE="${MESSAGE}: ${TASKTYPE} Requested"
echo_good
sqlite3 ${PIHOLE_DIR}/${GRAVITY_FI} ".backup '$HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/$(date +%F)-${GRAVITY_FI}'"
}
# Echo Stack # Echo Stack
## Informative ## Informative
function echo_info { function echo_info {
@ -1800,6 +1809,10 @@ case $# in
task_automate task_automate
;; ;;
backup)
task_backup
;;
*) *)
task_invalid task_invalid
;; ;;