backup remote grav

This commit is contained in:
Michael Stanclift 2020-07-11 15:17:27 -05:00
parent 9b7d536977
commit 78f97716a8

View File

@ -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