mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
backup remote grav
This commit is contained in:
parent
9b7d536977
commit
78f97716a8
@ -148,6 +148,8 @@ function pull_gs_grav {
|
|||||||
# echo_stat
|
# echo_stat
|
||||||
# cp ${PIHOLE_DIR}/${GRAVITY_FI} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.backup >/dev/null 2>&1
|
# cp ${PIHOLE_DIR}/${GRAVITY_FI} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.backup >/dev/null 2>&1
|
||||||
# error_validate
|
# error_validate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MESSAGE="Pulling ${GRAVITY_FI} from ${REMOTE_HOST}"
|
MESSAGE="Pulling ${GRAVITY_FI} from ${REMOTE_HOST}"
|
||||||
echo_stat
|
echo_stat
|
||||||
@ -205,6 +207,7 @@ function pull_gs_grav {
|
|||||||
|
|
||||||
## Pull Custom
|
## Pull Custom
|
||||||
function pull_gs_cust {
|
function pull_gs_cust {
|
||||||
|
|
||||||
backup_local_custom
|
backup_local_custom
|
||||||
|
|
||||||
if [ "$SKIP_CUSTOM" != '1' ]
|
if [ "$SKIP_CUSTOM" != '1' ]
|
||||||
@ -307,6 +310,8 @@ function pull_gs {
|
|||||||
|
|
||||||
## Push Gravity
|
## Push Gravity
|
||||||
function push_gs_grav {
|
function push_gs_grav {
|
||||||
|
backup_remote_gravity
|
||||||
|
|
||||||
MESSAGE="Backing Up ${GRAVITY_FI} from ${REMOTE_HOST}"
|
MESSAGE="Backing Up ${GRAVITY_FI} from ${REMOTE_HOST}"
|
||||||
echo_stat
|
echo_stat
|
||||||
RSYNC_REPATH="rsync"
|
RSYNC_REPATH="rsync"
|
||||||
@ -1734,6 +1739,16 @@ function backup_local_custom {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function backup_remote_gravity {
|
||||||
|
CMD_TIMEOUT='15'
|
||||||
|
CMD_REQUESTED="sqlite3 ${PIHOLE_DIR}/${GRAVITY_FI} \".backup '${PIHOLE_DIR}/${GRAVITY_FI}.backup'\""
|
||||||
|
create_sshcmd
|
||||||
|
}
|
||||||
|
|
||||||
|
function backup_remote_custom {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function backup_cleanup {
|
function backup_cleanup {
|
||||||
MESSAGE="Cleaning Up Old Backups"
|
MESSAGE="Cleaning Up Old Backups"
|
||||||
echo_stat
|
echo_stat
|
||||||
|
Loading…
Reference in New Issue
Block a user