_(Replicate To Other Servers)_
_(This Server's Key)_:
: =zfsmReplicaKeyHtml()?>
:zc_settings_send_key_plug:
> This server's own SSH key for sending copies, made here once. Its private half is kept on the flash drive, unencrypted: keep the flash share and every flash backup private. To set up a server to send to, follow the steps under **Accept Replicas Into** in that server's ZFS Master NG Settings.
:end
_(Servers)_:
: =zfsmReplicaRemotesHtml(zfsmReplicaRemotes())?>
:zc_settings_send_servers_plug:
> The servers this one may send copies to. Under each is the line to add to that server's SSH authorized keys (see **Accept Replicas Into** there), or what stops this server showing it.
>
> - Test makes this server's dataset there if it is missing, and shows its name.
> - Each server's host key is kept from when it was added. If it changes, that server is refused until you remove it and add it again.
> - The line's `from=` is the address this server sends from to reach that server. If this server's address changes, replace the line there with the new one. If a router between them changes the address (source NAT), that server refuses the key: set `from=` there to the exact address it sees.
>
> To send a copy, choose **Actions**, **Replicate** on a dataset in the Main tab, and pick the server under Server.
:end
_(Add A Server)_:
:
:zc_settings_send_add_plug:
> Give the server a name for this list and the Replicate dialog, its IP address and its SSH port, then press **Read Host Key**. Compare the host key read here with **This Server's Host Key** in that server's ZFS Master NG Settings, under Replication; tick that they match, then Add.
:end
_(Schedules)_
_(Snapshot Every Dataset)_:
:
:zc_settings_snapsched_plug:
> Takes a snapshot of every dataset in every pool: every hour at a minute of its own, or at the time you set on the days you tick (all seven: every day), in this server's time zone. Save changes it, and the answer and the list below say when it runs. Off stops it; the snapshots it took stay.
>
> - A dataset can have a schedule of its own, or None, under **Actions**, **Schedules** in the Main tab: it and the datasets below it follow that one instead, unless they have their own.
> - It leaves out read-only datasets, such as copies received here (a snapshot in one stops the next replication into it), and those mounted `legacy`, such as Docker's image layers. Make a dataset another tool receives copies into read-only too (`zfs set readonly=on`), or turn this off.
> - It also leaves out datasets with Sanoid or Syncoid snapshots (named `autosnap_` or `syncoid_`): that tool takes their snapshots, and Syncoid would carry scheduled ones into its copies, where Sanoid never removes them. Once those snapshots are deleted, the dataset is taken again. With a **Snapshots Prefix** that itself starts `autosnap_` or `syncoid_`, snapshots named with it count as this plugin's own, and so do that tool's when they start the same.
> - A run takes all of a pool's snapshots at one moment (one at a time if that fails), named by **Snapshots Pattern**. Nothing is taken when you save: the first run is at its time.
> - **Snapshots To Keep**: after each run, only the scheduled snapshots it keeps stay on each dataset, whichever snapshot schedule took them (a run removes up to 50 from each). A number keeps the newest that many; `7d`, `4w` and `12m` keep the newest snapshot of each of the last 7 days, 4 weeks (Monday first) and 12 months that have one, in this server's time zone, so a day with none doesn't count; `h` and `y` count hours and years. Give any of them together, such as `24 7d 4w 12m`: what any one keeps stays. Snapshots made by hand or by a copy's schedule are never counted or removed, and one held or cloned stays. Empty keeps all.
> - It and a copy's schedule can't start in the same minute: saving either one says so.
> - The first run with a problem sends a notification. Later ones are logged in `/var/log/zfs.master.log` until a run works again, and that run's notification says so.
:end
_(Days)_:
: =zfsmScheduleDaysHtml('zfsm-snapsched', $zfsm_snapsched['days'])?>
_(Starts At)_:
:
_(Snapshots To Keep)_:
:
:
_(Replicate Every Dataset)_:
:
:zc_settings_copysched_plug:
> Copies every dataset in every pool into the dataset you name under **Copy Under**, on this server, each copy named for its dataset: with `backup`, `cache/appdata` is copied to `backup/cache/appdata`. It runs every hour at a minute of its own, or at the time you set on the days you tick (all seven: every day), in this server's time zone. Save changes it, and the answer says how many datasets it copies. Off stops it; the copies and the snapshots it made stay.
>
> - Each run takes a new snapshot of each dataset, named by **Snapshots Pattern**, and sends the changes since the last one, as a copy's schedule does (see **Schedules** below): the first run sends each dataset in full, as does a run after a copy is gone, such as when the pool it goes into was made again. The copies are read-only and not mounted.
> - It leaves out the datasets in the pool it copies into, and the ones Snapshot Every Dataset leaves out: read-only datasets, such as copies received here, those mounted `legacy`, and those with Sanoid or Syncoid snapshots. It also leaves out a dataset whose own copy schedule (**Actions**, **Replicate** in the Main tab) makes that same copy, one whose name is too long for the bookmark its copy keeps (over about 70 characters under `backup`, fewer under a longer **Copy Under**), and, when a run can't read the snapshot names, those it couldn't read: they may be left to Sanoid or Syncoid.
> - A dataset's copy goes after the copy of the dataset above it. Where the dataset above one is not copied, an empty dataset, read-only and not mounted, is made in its place to hold the copies below it. If that dataset is copied later, its first copy replaces the empty one and the copies below it stay, though not while one of them is mounted, which receiving over it would unmount; an encrypted dataset sent raw can't replace it, nor can any copy replace an empty one that is encrypted, as one under an encrypted dataset is, and the run says what to do. When the copy of the dataset above one is missing because it failed, or the schedule that copies it has not made it yet, that one waits for the next run.
> - **Snapshots To Keep**: for each dataset, as for a copy's schedule: only the snapshots this schedule took that it keeps stay, on the dataset and in its copy. Empty keeps all. A new **Copy Under** starts new copies there: the copies under the old one, and the snapshots taken for them, stay, as with Off.
> - A dataset can have copies of its own, or None, under **Actions**, **Schedules** in the Main tab (**Replication**): it and the datasets below it follow that one instead, unless they have their own, each with its own **Copy Under**.
> - Renaming a dataset in the Main tab renames its copies under each **Copy Under** a schedule uses with it, unless a dataset already has the new name there, no schedule copies it or a dataset below it there now, what is there is neither its copy nor a holder of the copies below it, or a dataset made to hold it would stop an encrypted copy due there; it says which of those stayed, and a clash its schedules meet where they went. Nothing is renamed while a copy of it or a dataset below it runs, or when the new name leaves no room for the bookmark a copy made now keeps (named by Snapshots Pattern as it is now); a bookmark made before that no longer fits stays, and the rename says so. Copies under a **Copy Under** no schedule uses now stay as they are. Destroying a dataset removes what it and the datasets below it had under **Actions**, **Schedules**, and leaves its copies.
> - It and a snapshot schedule or copy's schedule of the same dataset can't start in the same minute: saving either one says so.
> - A run waits for another replication of a dataset that is still sending; its waits add up to 55 minutes at most. A dataset that can't start in that time is skipped, and counts as a problem. A run that falls due while the one before still goes, as a first run can, is skipped and logged; once the one before has gone on for a day, it counts as a problem.
> - Each run sends one notification at most: what it copied and its first problems. The first run with a problem sends it; later ones are logged in `/var/log/zfs.master.log` until a run works again, and that run's notification says so. The log has each dataset's replication.
:end
_(Copy Under)_:
:
_(Days)_:
: =zfsmScheduleDaysHtml('zfsm-copysched', $zfsm_copysched['days'])?>
_(Starts At)_:
:
_(Snapshots To Keep)_:
:
:
_(Schedules)_:
: =zfsmSchedulesHtml($zfsm_cfg)?>
:zc_settings_schedules_plug:
> Snapshot Every Dataset and Replicate Every Dataset, set above, each dataset's own snapshot schedule and copies (set under **Actions**, **Schedules** in the Main tab; Remove here sets it back to Default, unless the schedule it then follows would clash with one as saved), and the replications that run on their own. To add one of those, choose **Actions**, **Replicate** on a dataset in the Main tab and pick how often under Repeat: it runs then, and again every hour at a minute of its own, or at the time you set on the days you tick (all seven: every day), in this server's time zone. This list shows when.
>
> - Each run takes a new snapshot, named by **Snapshots Pattern**, and sends the changes since the last one. If the run before it stopped part-way, it carries that on first.
> - **Snapshots to keep** (set in Replicate; Remove the schedule and add it again to change it): from its second run on, once a run lands, only those it keeps of the snapshots this copy's schedules took stay, as **Snapshots To Keep** above reads it (such as `24 7d 4w 12m`), up to 50 removed a run. In a copy on this server the same snapshots go first; one held or cloned, there or here, stays on both. Snapshots made by hand, by Snapshot Every Dataset or by a schedule of another copy are never counted or removed. The one just sent counts but always stays: the next run sends the changes since it. A copy on another server keeps all of them, unless that server's **Keep Replicas** keeps fewer. Empty keeps all.
> - Each run holds its snapshot and the one it sends the changes since (`zfsm-resume-…`). One that stops part-way leaves them held, so nothing removes them before a run carries it on; a run to the copy that lands takes the hold off, and so does **Release** in Snapshots. When removing a snapshot fails, the run says which stays and why, and the next run tries again.
> - A run that finds its copy gone doesn't send it in full again: replicate it once by hand to make a new copy. (Copies under a **Copy Under** are made again.)
> - The first run with a problem sends a notification. Later ones are logged in `/var/log/zfs.master.log` until a run works again, and that run's notification says so.
> - A run that falls due while another replication of its dataset is still sending waits for it, up to 55 minutes. One that can't start in that time is skipped, and counts as a problem.
:end
_(Diagnostics)_
_(Unraid Diagnostics)_:
:
:zc_settings_diag_unraid_plug:
> Put Unraid's own diagnostics zip inside the plugin's. It goes in as Unraid made it: this plugin changes nothing in it, and its system log can name datasets.
> Its disk list (`system/df.txt`) can show mounted datasets by name.
:end
_(Diagnostics Zip)_:
:
:zc_settings_diag_zip_plug:
> Collects what a bug report needs into one zip: the plugin's settings, install and log, the pools and datasets as it reads them, what this browser shows, and what it finds wrong. The zip is kept in `/boot/logs`, the newest three of them.
> Dataset, snapshot and folder names, addresses and keys are replaced by tokens before anything is packed; pool names stay.
> If this page does not load, run `/usr/local/emhttp/plugins/zfs.master/scripts/diagnostics.php` in a terminal: it prints what it finds and the zip's path.
:end