GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
zelta-options(7) System Manager’s Manual zelta-options(7)

zelta-options - environment and policy options for Zelta behavior

Environment variables and policy configuration options.

Zelta’s behavior can be modified through environment variables, command-line arguments, and policy configuration files. This manual documents all available options and their effects.

Options are set differently based on context:

  • Shell environment: Environment variables must be prefixed with ZELTA_ (e.g., ZELTA_DEPTH=2)
  • Environment file: In zelta.env, use KEY=value pairs (e.g., DEPTH=2)
  • Policy file: zelta policy additionally uses the YAML-like zelta.conf for granular settings per backup job with KEY: value pairs (e.g., DEPTH: 1)
  • Command-line arguments: Options map to double-dash arguments (e.g., --depth)

For on/off variable assignments, use “1” for true and “0” for false.

Options follow an override hierarchy to provide flexibility in all contexts.

1.
Defaults - Built-in defaults in the zelta controller script
2.
zelta.env - System-wide environment file (default: /usr/local/etc/zelta/zelta.env)
3.
zelta.conf - Policy configuration file (zelta policy only, default: /usr/local/etc/zelta/zelta.conf)
4.
Environment variables - User environment (must prefix names with ZELTA_)
5.
Command-line arguments - Highest priority, overrides all other sources

For example, running zelta policy --no-snapshot will ensure the all configured backups will run without taking snapshots regardless of snapshot configuration in other contexts.

The following options should be modified in the environment to ensure proper installation and startup of the zelta script. Typically, these should be defined in the user’s shell rc script. In particular, ZELTA_AWK and ZELTA_ENV will be used prior to loading zelta.env so they must be exported beforehand.

The awk executable. The default is the awk in the path. Example: ZELTA_AWK='mawk -Wi'.
The location of Zelta assets including the AWK scripts and data files. The default is /usr/local/share/zelta.
The location of zelta.env and zelta.conf. The default is /usr/local/etc/zelta.
The exact path of zelta.env.
The location of Zelta’s manpages. Default is unset, using the system-wide manual.

Divert all output into the indicated file.
Specify a log level value 0-4: errors (0), warnings (1), notices (2, default), info (3, verbose), and debug (4).
Enable the specified log modes. Currently supported: `text' (default) and `json' (zelta backup related verbs only).

The remote shell command. Defaults to ssh.
The default remote shell command used for misc operations which should prevent reading from stdin. Defaults to REMOTE_COMMAND -n (ssh -n).
The remote shell command used for zfs send. Defaults to REMOTE_COMMAND (ssh).
The remote shell command used for zfs recv. Defaults to REMOTE_DEFAULT (ssh -n).

Limit the recursion depth of operations to the number of levels indicated. For example, a depth of 1 will only include the indicated source dataset. Has no effect with REPLICATE enabled.
Exclude datasets or source snapshots matching the specified exclusion pattern. See EXCLUSION PATTERNS below.

Suppress column headers and separate columns with a single tab. Useful for parsing output in scripts.
Output sizes in exact numbers instead of human-readable values like 1M.
Specify a list of zelta match columns. See zelta-match(8) for more detail.
Calculate data sizes for datasets and snapshots in the summary. Enabled by default.
Calculate the time of each zfs list operation.

Override all zfs send options with those indicated. For precise and flexible configuration for different circumstances, use the SEND_* variables below instead.
Options used for unencrypted filesystems and volumes. Defaults to -Lce.
Options used for encrypted datasets. Defaults to -Lw.
Additional option used for new datasets. Defaults to -p.
Toggle option to transmit intermediate snapshots (1, the default) or incremental (0).
Options to use in zelta backup -R mode. Defaults to zfs send -LsRw.
Attempt to drop unsupported zfs send options using a no-op test prior to replication. This feature is not fully implemented.
Override all zfs receive options with those indicated. For precise and flexible configuration, use the RECV_* variables instead.
Default zfs recv options. Defaults to none.
Additional options for the top dataset during new (full) backup. Defaults to -o readonly=on.
Additional options for filesystems during a new (full) backup. Defaults to -u -x mountpoint -o canmount=noauto.
Additional options for volumes new (full). Defaults to none.
Add the list of `zfs recv -o' properties in the form property=value. See `zfs-receive(8)'.
Add the list of `zfs recv -x' excluded properties. See `zfs-receive(8)'.
Additional options if RESUME is enabled. Defaults to -s.
Pipe output through the indicated command, such as dd status=progress.
Enable (1, the default) or disable automatic resume of interrupted syncs.

Specify a snapshot name. Use the form $(my_snapshot_program) to use a dynamically generated snapshot. The default is $(date -u +zelta_%Y-%m-%d_%H.%M.%S).
Specify when to snapshot during a zelta backup operation. Options: 0 (never), IF_NEEDED (default, only if source has new data), or ALWAYS.
If both endpoints are remote, use PULL (the default) or PUSH sync. If set to 0, traffic will stream through the local host. Note that this feature PUSH and PULL features require appropriate ssh configurations with keys properly installed and/or ssh agent forwarding enabled.

Options for recursive cloning. Defaults to -po readonly=off.

The following options only effect zelta policy operations.

Retry failed syncs the indicated number of times.
Run the indicated number of policy jobs concurrently, one for each Site in the configuration.
The relative target path for backup jobs. For example, bkhost:tank/Backups would place backups below that dataset (if not overridden by policy).
NOT YET IMPLEMENTED. The relative target path used for rotated clones.
Include the source hostname as a parent of the synced target.
Example: Source web1:sink/dataset with BACKUP_ROOT: tank/backups becomes tank/backups/web1/dataset.
Similar to zfs recv -d, include the indicated number of parent dataset labels for the BACKUP_ROOT’s (or specified target’s) name. If set to -1 all labels up to the pool name will be attached to the target name.
Example: Source web1:sink/source/dataset with BACKUP_ROOT: tank/backups:
  • 0: tank/backups/dataset
  • 1: tank/backups/source/dataset
  • -1: tank/backups/sink/source/dataset
ADD_HOST_PREFIX stacks with ADD_DATASET_PREFIX. With both enabled, the hostname is prepended first: tank/backups/web1/source/dataset.

The EXCLUDE option, or the arguments --exclude or -X, contain a comma separated list of patterns to exclude datasets or source snapshots from operations. Excluding a dataset will also exclude its children.

Similar to zfs send --exclude, exclude the named source dataset from operations.
Example: tank/vm/swap excludes that specific dataset.
Prefix with / to exclude the dataset suffix relative to the given dataset name.
Example: Given the dataset sink/swap and the pattern /swap: sink/swap will be excluded, but sink/vm/swap will not be excluded.
Use glob-like matching of * (zero or more characters) or ? (single character). The pattern must start with `/' or ’*’ and must contain a `/'.
Examples, given the given source of sink/data:
  • */swap would exclude sink/data/one/swap, sink/data/two/swap, and sink/data/swap
  • /*/swap would exclude sink/data/one/swap and sink/data/two/swap but not sink/data/swap
  • /vm-* would exclude sink/data/vm-one and its descendants, but not sink/data/vm/one
  • /test? would exclude sink/data/test1 but not sink/data/test15
Match snapshots by name. Prefix with @ to indicate a snapshot.
Example: @manual-backup excludes any snapshot named manual-backup.
Use glob-like matching of * (zero or more characters) or ? (single character). Snapshot names must begin with @.
Examples:
  • @*_hourly excludes snapshots ending in _hourly
  • @snap-2024* excludes snapshots beginning with snap-2024
  • @auto-*00?? excludes snapshots beginning with auto- and ending with 00 and two of any character

Pattern Type Example Matches
Absolute dataset tank/vm/swap Exact dataset
Relative dataset /tmp Top dataset ending in /tmp
Relative dataset wildcard */swap Any dataset ending in /swap
Snapshot name @manual-backup Exact snapshot name
Snapshot wildcard @*_hourly Snapshots matching pattern

Datasets

Excluding a dataset will also exclude its descendants.

Snapshots

For incremental replication, at least one common snapshot must remain between source and target. Therefore, snapshot exclusion logic is only meaningful when applied to incremental source snapshots in incremental mode (SEND_INTR=0 or -i). For example, snapshot exclusion is useful for skipping hourly snapshots and but updating dailies.

  • Excluding a target’s most recent snapshot will cause an incremental to fail
  • In intermediate mode (the default), intermediate snapshots will still be included
  • Bookmark exclusions are not supported as they serve only as replication sources

Set options via environment for a one-off run:

export ZELTA_LOG_LEVEL=4
export ZELTA_REMOTE_COMMAND="ssh -p 2202"
zelta backup pool/dataset remote:pool/backup
    

Configure zelta.conf:

# In zelta.conf, variables act as policy scopes but
# use the same option names.
LOG_MODE: json
JOBS: 2
NYC1:

BACKUP_ROOT: backuphost:tank/Backups
RETRY: 3

zelta(8), zelta-backup(8), zelta-clone(8), zelta-match(8), zelta-policy(8), zelta-rotate(8), zelta-sync(8), cron(8), ssh(1), zfs(8)

Daniel J. Bell <bellhyve@zelta.space>

https://zelta.space


Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.