====== Backup a Dataset ====== ABI uses [[https://github.com/oferdale/zelta|zelta]] to replicate ZFS datasets from production servers to the backup server **hoth** via ZFS send/recv. Backups run automatically via cron, but this page covers how to manually trigger a backup. ===== The Backup Server: hoth ===== **hoth** (bak1) is the dedicated backup server. Its main backup pool is **zbak1** (183TB). Hoth's own root filesystem lives on a separate pool called **zrbak1** (440G), which is not part of the backup target. Backups from other servers are stored under zbak1, roughly mirroring the source pool names: | Path on hoth | Source | What | |--------------|--------|------| | ''zbak1/zbane'' | bane ('zbane') | Full bane pool: rootfs, jails, VMs | | ''zbak1/genomic/nextseq2000'' | geonosis ('genomic') | NextSeq 2000 sequencing runs | | ''zbak1/genomic/zroot'' | geonosis ('zroot') | Geonosis root filesystem, jails, VMs | | ''zbak1/genomic/rootfs'' | geonosis ('genomic') | bhyve VM rootfs datasets (ssh-01, thin-01, etc.) | Other datasets on zbak1 include user archives (''zbak1/antranigv'', etc.), ABI project archives (''zbak1/abi''), and shared storage (''zbak1/moving_archive'', ''zbak1/storage3''). ===== The zelta Command ===== The general form of a manual backup: zelta backup [-V] [-p] * **** — the ZFS dataset or pool on the server you are on (e.g. ''zbane'' or ''genomic/abi/devices/nextseq2000''). * **** — the target on hoth, prefixed with ''hoth:'' (e.g. ''hoth:zbak1/zbane''). * **-V** — verbose output. * **-p** — use when backing up a parent dataset that should pull its children (pool-level send). You run zelta **from the source server**, not from hoth. SSH into the server whose data you want to back up, become root, and run the command. ===== Examples ===== ==== Backing up the bane server ==== This replicates the entire ''zbane'' pool (rootfs, all jails, all VMs) to hoth: zelta backup zbane hoth:zbak1/zbane ==== Backing up NextSeq 2000 runs ==== The sequencing data from the NextSeq 2000 lives at ''genomic/abi/devices/nextseq2000'' on geonosis. To back it up: zelta backup -V -p genomic/abi/devices/nextseq2000 hoth:zbak1/genomic/nextseq2000 ==== Backing up geonosis root ==== To back up geonosis's root filesystem (including its jails and VM datasets): zelta backup -V -p zroot hoth:zbak1/genomic/zroot ===== Notifications with ntfy ===== You can wrap the zelta command with ''ntfy'' to get a push notification (via Pushover) when the backup starts and finishes: ntfy -t "`hostname`" send "zelta starting" && zelta backup zbane hoth:zbak1/zbane && ntfy -t "`hostname`" send "zelta done" The ''-t'' flag sets the notification title (here, the hostname). This way you know immediately if a backup has completed or if it never started. ===== See Also ===== * [[infra:servers|Server Inventory]] * [[https://github.com/oferdale/zelta|zelta on GitHub]]