Use generic hostnames in repository examples
This commit is contained in:
1 parent
cef7a4ac7b
commit
22acd4f20c
2 files changed
+16
-16
No files matched your search
+6
-6
@@ -2,7 +2,7 @@
|
|||||||
SOURCE_BASE_DIR="/dockervolumes"
|
SOURCE_BASE_DIR="/dockervolumes"
|
||||||
BACKUP_ROOT="/dockerbackups"
|
BACKUP_ROOT="/dockerbackups"
|
||||||
CONTAINERS_FILE="containers.local.txt"
|
CONTAINERS_FILE="containers.local.txt"
|
||||||
BACKUP_HOSTNAME="beaver"
|
BACKUP_HOSTNAME="examplehostname"
|
||||||
|
|
||||||
# Main pipeline method order. Add future method names here.
|
# Main pipeline method order. Add future method names here.
|
||||||
BACKUP_METHODS="rclone smb"
|
BACKUP_METHODS="rclone smb"
|
||||||
@@ -16,21 +16,21 @@ ZSTD_EXTRA_OPTS="-T0 -12"
|
|||||||
|
|
||||||
# Optional retained MQTT status and command listener settings.
|
# Optional retained MQTT status and command listener settings.
|
||||||
MQTT_REPORT_ENABLED=0
|
MQTT_REPORT_ENABLED=0
|
||||||
MQTT_HOST="beaver"
|
MQTT_HOST="examplehostname"
|
||||||
MQTT_PORT=1883
|
MQTT_PORT=1883
|
||||||
MQTT_USERNAME="dockerbackup"
|
MQTT_USERNAME="dockerbackup"
|
||||||
MQTT_PASSWORD_FILE="/etc/zorruno-docker-backup/mqtt-password"
|
MQTT_PASSWORD_FILE="/etc/zorruno-docker-backup/mqtt-password"
|
||||||
MQTT_STATUS_TOPIC="viewroad-status/dockerbackup/beaver"
|
MQTT_STATUS_TOPIC="viewroad-status/dockerbackup/examplehostname"
|
||||||
MQTT_COMMAND_TOPIC="viewroad-commands/dockerbackup/beaver/run"
|
MQTT_COMMAND_TOPIC="viewroad-commands/dockerbackup/examplehostname/run"
|
||||||
|
|
||||||
# Rclone destination becomes <remote>/beaver/.
|
# Rclone destination becomes <remote>/examplehostname/.
|
||||||
RCLONE_ENABLED=0
|
RCLONE_ENABLED=0
|
||||||
RCLONE_REMOTE="gdrive:dockerbackups"
|
RCLONE_REMOTE="gdrive:dockerbackups"
|
||||||
RCLONE_HOST_SUBDIR=1
|
RCLONE_HOST_SUBDIR=1
|
||||||
RCLONE_EXTRA_ARGS=""
|
RCLONE_EXTRA_ARGS=""
|
||||||
|
|
||||||
# The SMB share must already be mounted by the operating system.
|
# The SMB share must already be mounted by the operating system.
|
||||||
# Destination becomes <mount>/beaver/ when SMB_HOST_SUBDIR=1.
|
# Destination becomes <mount>/examplehostname/ when SMB_HOST_SUBDIR=1.
|
||||||
SMB_ENABLED=0
|
SMB_ENABLED=0
|
||||||
SMB_MOUNT="/mnt/dockerbackups"
|
SMB_MOUNT="/mnt/dockerbackups"
|
||||||
SMB_HOST_SUBDIR=1
|
SMB_HOST_SUBDIR=1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Zorruno Docker Backup Scripts
|
# Zorruno Docker Backup Scripts
|
||||||
|
|
||||||
Modular backup scripts for Docker Compose servers such as Panda and Beaver.
|
Modular backup scripts for Docker Compose servers.
|
||||||
Each server has its own untracked `.env` and `containers.txt`, while all script
|
Each server has its own untracked `.env` and `containers.local.txt`, while all script
|
||||||
logic remains common and can be updated through Git.
|
logic remains common and can be updated through Git.
|
||||||
|
|
||||||
## Pipeline
|
## Pipeline
|
||||||
@@ -30,7 +30,7 @@ prune stage. Use the new `backup.sh` for the complete pipeline.
|
|||||||
The account running the scripts must be allowed to control Docker and read all
|
The account running the scripts must be allowed to control Docker and read all
|
||||||
files under `/dockervolumes`.
|
files under `/dockervolumes`.
|
||||||
|
|
||||||
## Installation on Beaver
|
## Installation on a server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo git clone https://home.fox.co.nz/gitea/zorruno/zorruno-backupdockerscript.git /backupdockerscripts
|
sudo git clone https://home.fox.co.nz/gitea/zorruno/zorruno-backupdockerscript.git /backupdockerscripts
|
||||||
@@ -41,22 +41,22 @@ sudo chmod 600 .env
|
|||||||
sudo chmod +x backup.sh stages/*.sh
|
sudo chmod +x backup.sh stages/*.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit `.env`. Beaver's Docker source is already represented by:
|
Edit `.env`. A typical Docker source and example host name are represented by:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
SOURCE_BASE_DIR="/dockervolumes"
|
SOURCE_BASE_DIR="/dockervolumes"
|
||||||
BACKUP_HOSTNAME="beaver"
|
BACKUP_HOSTNAME="examplehostname"
|
||||||
```
|
```
|
||||||
|
|
||||||
Choose and create a local staging path for `BACKUP_ROOT`. `/dockerbackups` is
|
Choose and create a local staging path for `BACKUP_ROOT`. `/dockerbackups` is
|
||||||
the default, but it should be on a filesystem with enough free space to hold
|
the default, but it should be on a filesystem with enough free space to hold
|
||||||
at least `KEEP_COUNT` copies of every listed project.
|
at least `KEEP_COUNT` copies of every listed project.
|
||||||
|
|
||||||
Edit Beaver's untracked `containers.local.txt`. Each active line can be either a running
|
Edit the server's untracked `containers.local.txt`. Each active line can be either a running
|
||||||
container name or a directory name beneath `/dockervolumes`. Blank lines and
|
container name or a directory name beneath `/dockervolumes`. Blank lines and
|
||||||
text after `#` are ignored. If several entries resolve to the same Compose
|
text after `#` are ignored. If several entries resolve to the same Compose
|
||||||
project directory, that project is backed up only once. Keeping this host-local
|
project directory, that project is backed up only once. Keeping this host-local
|
||||||
file out of Git prevents a pull on Panda or Beaver from replacing its list.
|
file out of Git prevents a pull on any server from replacing its local list.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@@ -141,12 +141,12 @@ Enable retained run results in the host's `.env`:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
MQTT_REPORT_ENABLED=1
|
MQTT_REPORT_ENABLED=1
|
||||||
MQTT_HOST="beaver"
|
MQTT_HOST="examplehostname"
|
||||||
MQTT_PORT=1883
|
MQTT_PORT=1883
|
||||||
MQTT_USERNAME="dockerbackup"
|
MQTT_USERNAME="dockerbackup"
|
||||||
MQTT_PASSWORD_FILE="/etc/zorruno-docker-backup/mqtt-password"
|
MQTT_PASSWORD_FILE="/etc/zorruno-docker-backup/mqtt-password"
|
||||||
MQTT_STATUS_TOPIC="viewroad-status/dockerbackup/panda"
|
MQTT_STATUS_TOPIC="viewroad-status/dockerbackup/examplehostname"
|
||||||
MQTT_COMMAND_TOPIC="viewroad-commands/dockerbackup/panda/run"
|
MQTT_COMMAND_TOPIC="viewroad-commands/dockerbackup/examplehostname/run"
|
||||||
```
|
```
|
||||||
|
|
||||||
The retained status JSON includes overall status, timestamps, duration, exit
|
The retained status JSON includes overall status, timestamps, duration, exit
|
||||||
|
|||||||
Reference in new issue
Block a user