Updated Advanced Installs (markdown)

Michael Stanclift 2020-10-21 13:16:03 -05:00
parent 37e90e3677
commit d2015b3851

@ -1,12 +1,14 @@
The intent of this page is to document ways of doing things manually. The page title starts with a U to keep it lower on the sidebar.
### Manual Install
If you don't want to use the automated installer, you can use git to manually clone Gravity Sync to your _secondary_ Pi-hole server.
```bash
git clone https://github.com/vmstan/gravity-sync.git
```
If you don't trust `git` to install your software, or just like doing things by hand, that's fine.
_Keep in mind that installing via this method means you won't be able to use Gravity Sync's built-in update mechanism._
#### No Git
If you don't trust `git` to install your software, or just like doing things by hand, that's fine. Just keep in mind that installing via this method means you won't be able to use Gravity Sync's built-in update mechanism.
Download the latest release from [GitHub](https://github.com/vmstan/gravity-sync/releases) and extract the files to your _secondary_ Pi-hole server.
@ -17,7 +19,7 @@ unzip v3.x.x.zip -d gravity-sync
cd gravity-sync
```
## Configuration
### Manual Configuration
If you don't want to use the automated configuration utility at `./gravity-sync.sh config` you can setup your configuration manually as well.
@ -37,11 +39,11 @@ REMOTE_HOST='192.168.1.10'
REMOTE_USER='pi'
```
## SSH Configuration
### Manual SSH Configuration
Gravity Sync uses SSH to run commands on the primary Pi-hole, and sync the two systems by performing file copies.
### Key-Pair Authentication
#### Key-Pair Authentication
You'll need to generate an SSH key for your secondary Pi-hole user and copy it to your primary Pi-hole. This will allow you to connect to and copy the necessary files without needing a password each time. When generating the SSH key, accept all the defaults and do not put a passphrase on your key file.
@ -56,19 +58,19 @@ Substitute REMOTE_USER for the account on the primary Pi-hole with sudo permissi
Make sure to leave the `REMOTE_PASS` variable set to nothing in `gravity-sync.conf` if you want to use key-pair authentication.
### Password Authentication
#### Password Authentication
This option has been removed from Gravity Sync as of version 3.1.
## Updates
### Updates
If you manually installed Gravity Sync via `.zip` or `.tar.gz` you will need to download and overwrite the `gravity-sync.sh` file with a newer version. If you've chosen this path, I won't lay out exactly what you'll need to do every time, but you should at least review the contents of the script bundle (specifically the example configuration file) to make sure there are no new additional files or required settings.
If you manually installed Gravity Sync via `.zip` or `.tar.gz` you will need to download and overwrite the contents of the zip `gravity-sync.sh` file with a newer version. If you've chosen this path, I won't lay out exactly what you'll need to do every time, but you should at least review the contents of the script bundle (specifically the example configuration file) to make sure there are no new additional files or required settings. I do not document the changes from version to version in terms of file layout, because the Git install makes this unnecessary.
At the very least, I would recommend backing up your existing `gravity-sync` folder and then deploying a fresh copy each time you update, and then either creating a new .conf file or copying your old file over to the new folder.
## Automation
### Automation
There are many automation methods available to run scripts on a regular basis of a Linux system. The one built into all of them is cron, but if you'd like to utilize something different then the principles are still the same.
There are many automation methods available to run scripts on a regular basis of a Linux system. The one built into almost all of them is cron, so that's what Gravity Sync will use, but if you'd like to utilize something different then the principles are still the same.
If you prefer to still use cron but modify your settings by hand, using the entry below will cause the entry to run at the top and bottom of every hour (1:00 PM, 1:30 PM, 2:00 PM, etc) but you are free to dial this back or be more aggressive if you feel the need.
@ -78,9 +80,9 @@ crontab -e
0 23 * * * /bin/bash /home/USER//gravity-sync/gravity-sync.sh backup >/dev/null 2>&1
```
### Automating Automation
#### Automating Automation
To automate the deployment of automation option you can call it with 2 parameters:
Some folks are deploying Gravity Sync via an automation pipeline, and in order to automate the automation function 🤯 you can call it with 2 parameters:
- First interval in minutes to run sync [0-30]
- Second the hour to run backup [0-24]