mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
backup
This commit is contained in:
parent
23a6ceed3a
commit
248536417b
@ -14,8 +14,8 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
wget https://github.com/vmstan/gravity-sync/archive/v2.0.2.zip
|
||||
unzip v2.0.2.zip -d gravity-sync
|
||||
wget https://github.com/vmstan/gravity-sync/archive/v2.1.0.zip
|
||||
unzip v2.1.0.zip -d gravity-sync
|
||||
cd gravity-sync
|
||||
```
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
# 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
|
||||
### The Smart Release
|
||||
|
||||
|
@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS
|
||||
|
||||
# GRAVITY SYNC BY VMSTAN #####################
|
||||
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')
|
||||
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
||||
@ -1605,6 +1605,15 @@ function task_invalid {
|
||||
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
|
||||
## Informative
|
||||
function echo_info {
|
||||
@ -1800,6 +1809,10 @@ case $# in
|
||||
task_automate
|
||||
;;
|
||||
|
||||
backup)
|
||||
task_backup
|
||||
;;
|
||||
|
||||
*)
|
||||
task_invalid
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user