aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2025-02-16 17:40:47 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2025-02-16 17:40:47 +0000
commit7af7b4e9f1b67cac1508fa508504505be33f0d88 (patch)
treeaf6127e0e5c6d791f32e1aa501f74572e0d8026b
parentf1ebe61647115a3cce8da64bfd2a3f6c360db5d1 (diff)
downloadBetterZFSReplication-7af7b4e9f1b67cac1508fa508504505be33f0d88.tar.gz
BetterZFSReplication-7af7b4e9f1b67cac1508fa508504505be33f0d88.zip
Updated README and fixed some bugs
-rw-r--r--README.md5
-rw-r--r--autoBackup/autoBackup.py4
-rw-r--r--autoBackup/docker-compose.yml6
3 files changed, 10 insertions, 5 deletions
diff --git a/README.md b/README.md
index fb209db..26c9388 100644
--- a/README.md
+++ b/README.md
@@ -21,3 +21,8 @@ If the Tasmota MQTT plug was already on when the script starts, it implies that
be switched off.
It is recommended to run ZFS scrub tasks manually occasionally, otherwise they probably won't be run by TrueNAS.
+
+A Dockerfile is provided so you can automatically run this script as a cronjob.
+
+The MQTT Tamsmota stuff is pretty specific to my setup so might not be too useful to others; but the TrueNAS API stuff might be useful to other people. It probably wouldn't be too hard to make this work with wake-on-lan instead. We are using the HTTP API instead of the sockets API, since the sockets API seems to change quite a lot. We use standard TrueNAS API keys.
+
diff --git a/autoBackup/autoBackup.py b/autoBackup/autoBackup.py
index 9b5dee5..166ad5a 100644
--- a/autoBackup/autoBackup.py
+++ b/autoBackup/autoBackup.py
@@ -179,7 +179,7 @@ def main():
if was_already_on:
logging.info("The slave TrueNAS was turned on not by us, so stopping here")
else:
- logging.info("The slave TrueNAS was turned on my us, so starting the shutdown procedure")
+ logging.info("The slave TrueNAS was turned on by us, so starting the shutdown procedure")
logging.info(json.dumps(slave.shutdown(), indent = 4))
# wait until the slave TrueNAS is using 0w of power, which implies it has finished shutting down,
@@ -192,4 +192,4 @@ def main():
if __name__ == "__main__":
main()
- \ No newline at end of file
+
diff --git a/autoBackup/docker-compose.yml b/autoBackup/docker-compose.yml
index 2f43e77..f23ecb8 100644
--- a/autoBackup/docker-compose.yml
+++ b/autoBackup/docker-compose.yml
@@ -2,13 +2,13 @@ version: "3"
services:
autoReplicate:
- container_name: autoReplicate
+ container_name: auto_replicate
volumes:
- ./logs/:/app/logs
env_file:
- ./.env
restart: unless-stopped
- image: reg.reaweb.uk/autoBackup
+ image: reg.reaweb.uk/auto_replicate
build:
context: .
- dockerfile: Dockerfile \ No newline at end of file
+ dockerfile: Dockerfile