|
NAMEzelta backup - replicate a ZFS dataset tree SYNOPSISzelta backup [OPTIONS] source target DESCRIPTIONzelta backup recursively replicates snapshots from a source ZFS dataset to a target dataset. Both source and target may be local or remote via ssh(1). As with other Zelta commands, zelta backup works recursively on a dataset tree. The target dataset must be a replica of the source or must not exist. Prior to replication, zelta backup analyzes both source and target to automatically select optimal zfs send and zfs recv options. This process includes property inspection, parent dataset creation if needed, snapshot GUID comparison via zelta match, and one or more send/recv operations to update the target. Replication Processzelta backup performs these operations:
Send OptionsThe following zfs send options are applied based on dataset properties:
Target Safety FeaturesTo ensure safe and repeatable replication, the following measures are applied to the target:
Source and Target EndpointsRemote dataset endpoint names follow scp(1) conventions and require standard ZFS utilities and SSH access. Note that Zelta does not need to be installed on remote ZFS servers. Examples:
OPTIONSEndpoint Arguments (Required)If both endpoints are remote, the default behavior is pull replication (--pull). This requires that the target user have ssh access to the source, typically provided by ssh keys or agent forwarding. For advanced ssh configuration, see https://zelta.space.
Output Options
Connection Options
Dataset Options
Snapshot Options
Sync Options
Advanced Override OptionsWARNING: These options override Zelta’s automatic safety and efficiency logic. Incorrect usage can result in target data loss or decrypted backup streams. Use only when you understand the implications. Zelta automatically applies non-destructive and efficient zfs send and zfs recv options based on dataset type and context. These defaults can be modified three ways:
Most Common Use Case: Recompress Backups Typically, users adjust Zelta options because they would like to aggressively compress data on their backup endpoints. This is best done with the --send-default and --recv-default flags, which will not prevent Zelta from sending encrypted backups in raw (encrypted) format:
All overrides can also be configured globally in zelta.env or per-job via zelta.conf. Important: Options with Special HandlingSeveral zfs send and zfs recv options have special meaning in Zelta and should generally not be included in override strings: Zelta uses these internally: - zfs send --parsable (-P) — Used for progress tracking - zfs recv -v — Used for operational feedback These have Zelta-specific behavior (see OPTIONS above): - -I and -i — Control incremental behavior; use the flags documented above instead - --exclude, -X — Has additional Zelta functionality beyond the zfs send version - --dryrun, -n — Shows commands that would run; handled by Zelta - -t — Used automatically for resume tokens Not supported: - zfs send -S — Unsupported - zfs recv -A — Should be used manually when needed Granular Override OptionsFor precise control in a dataset tree with mixed types, override specific contexts. These options are cumulative—for example, a filesystem receive will combine options from --recv-default, --recv-top (if applicable), and --recv-fs.
Examples:
Dataset Tree Override OptionsThese options replace all context-specific defaults for an entire backup job. Use when you need complete control over a specific command.
Example:
Pass-Through Override FlagsIf any pass-through flag is specified, it replaces all automatic options for that command. For example, specifying -L alone means zfs send will receive only -L—no compression, no embedded data, no properties. The following unambiguous zfs send and zfs recv flags are passed through directly: zfs send: -b, --backup, --embed, --holds, -L, --largeblock, --proctitle, --props, --raw, --skipmissing, -V, -w zfs recv: -F, -M, -u, -o, -x Ambiguous or unsupported flags: - Single-dash options with multiple meanings are not supported: -c, -d, -e, -h, -s - Options with Zelta-specific handlers (see above): -I, -i, -R, -X, -n Example:
When in doubt, use the granular override options instead. EXAMPLESThe same command works for both new and existing target datasets. Local replication with automatic snapshot creation:
Remote to local synchronization:
Dry run to preview commands:
Replicate with custom snapshot naming:
Incremental sync, skipping intermediate snapshots:
Limit recursion depth:
EXIT STATUSReturns 0 on success, non-zero on error. NOTESSee zelta-options(7) for environment variables, zelta.env configuration, and zelta policy integration. The zelta sync command is a convenience alias for zelta backup -i and may be extended in future versions with additional optimizations for continuous replication workflows. SEE ALSOzelta(8), zelta-options(7), zelta-match(8), zelta-policy(8), zelta-clone(8), zelta-revert(8), zelta-rotate(8), ssh(1), zfs(8), zfs-send(8), zfs-receive(8) AUTHORSDaniel J. Bell <bellhyve@zelta.space> WWWhttps://zelta.space
|