diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2025-02-16 17:04:52 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-02-16 17:04:52 +0000 |
commit | ba742bbb4a884f668437b98a490b84d87d6df846 (patch) | |
tree | a90adb60cd22165b5e0927aba1a7c60c887a2c70 /README.md | |
parent | 464b9fadc814bbd45f4e75376cdd9b6703bfad0b (diff) | |
download | BetterZFSReplication-ba742bbb4a884f668437b98a490b84d87d6df846.tar.gz BetterZFSReplication-ba742bbb4a884f668437b98a490b84d87d6df846.zip |
Enabled the script to switch off the slave TrueNAS
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -4,3 +4,20 @@ Do ZFS replication in a better way than the TrueNAS UI Because the UI abstracts away the raw CLI options and I don't know what it's really doing  + +# autoBackup +[`autoBackup`](/autoBackup/) is a nice script that boots another TrueNAS machine, runs some ZFS replication tasks, +and then turns itself off again. + +The script consists of a `master` TrueNAS and a `slave` TrueNAS. It is assumed that the `master` TrueNAS is already +on when this script is executed. The `slave` TrueNAS is switched on with the use of a Tasmota-flashed power plug, like [this](https://www.aliexpress.com/item/1005008170716102.html?spm=a2g0o.productlist.main.3.aa15JW8VJW8Vv1&algo_pvid=a947a69a-023e-42be-85fc-8c6e3000e4e1&algo_exp_id=a947a69a-023e-42be-85fc-8c6e3000e4e1-1&pdp_ext_f=%7B%22order%22%3A%2232%22%2C%22eval%22%3A%221%22%7D&pdp_npi=4%40dis%21GBP%2116.42%217.00%21%21%21145.82%2162.16%21%402103846917397249539965105e8199%2112000044086004119%21sea%21UK%210%21ABX&curPageLogUid=eQIYf54PMGje&utparam-url=scene%3Asearch%7Cquery_from%3A), using MQTT. + +The script waits until the slave TrueNAS can recieve API requests, then runs a number of named ZFS replication tasks, as configured in the UI. +Therefore these tasks should not be set to run automatically in the TrueNAS UI. The tasks can be both on the `master` TrueNAS (push tasks), +and on the `slave` TrueNAS (pull tasks). Once all the replication tasks are completed, if the `slave` TrueNAS was switched on by this script, +it is shut down, and once the plug is pulling 0w, which implies the TrueNAS has fully shut down, the Tasmota plug is switched off. + +If the Tasmota MQTT plug was already on when the script starts, it implies that the `slave` TrueNAS was started manually, so it won't automatically +be switched off. + +It is recommended to run ZFS scrub tasks manually occasionally, otherwise they probably won't be run by TrueNAS. |