diff --git a/README.md b/README.md index 1ede2c0..9820252 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync ``` cd ~ -wget https://github.com/vmstan/gravity-sync/archive/v1.2.4.zip -unzip v1.2.4.zip -mv ~/gravity-sync-1.2.4 ~/gravity-sync +wget https://github.com/vmstan/gravity-sync/archive/v1.2.5.zip +unzip v1.2.5.zip +mv ~/gravity-sync-1.2.5 ~/gravity-sync cd gravity-sync ``` @@ -120,7 +120,9 @@ There is an option in the script to `push` from the secondary PH back to the pri ./gravity-sync.sh push ``` -Please note that the "push" option *does not make any backups of anything*. There is a warning about potental data loss before executing this function. This function purposefuly asks for user interaction to avoid being accidentally automated. +Before executing, this will make a copy of the remote database under `backup/gravity.db.push` then push the local configuration to the remote server. + +This function purposefuly asks for user interaction to avoid being accidentally automated. ## Updates diff --git a/gravity-sync.sh b/gravity-sync.sh index c7b2b63..f5a4abc 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -103,7 +103,7 @@ function push_gs { rsync -v -e 'ssh -p 22' ${REMOTE_USER}@${REMOTE_HOST}:${PIHOLE_DIR}/${GRAVITY_FI} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.push echo -e "[${CYAN}STAT${NC}] Pushing ${GRAVITY_FI} to ${REMOTE_HOST}" rsync --rsync-path="sudo rsync" -v -e 'ssh -p 22' ${PIHOLE_DIR}/${GRAVITY_FI} ${REMOTE_USER}@${REMOTE_HOST}:${PIHOLE_DIR}/${GRAVITY_FI} - echo -e "[${CYAN}STAT${NC}] Applying Rermissions to Remote ${GRAVITY_FI}" + echo -e "[${CYAN}STAT${NC}] Applying Permissions to Remote ${GRAVITY_FI}" ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI}" ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chown pihole:pihole ${PIHOLE_DIR}/${GRAVITY_FI}" echo -e "[${CYAN}STAT${NC}] Reloading FTLDNS Configuration"