FreeBSD Manual Pages
zelta-prune(8) System Manager's Manual zelta-prune(8) NAME zelta prune - identify snapshots safe for deletion based on backup state SYNOPSIS zelta prune [OPTIONS] source target DESCRIPTION zelta prune identifies snapshots on a source dataset that have been safely replicated to a target and are eligible for deletion based on retention policies. This command is useful for managing snapshot accu- mulation on production systems while ensuring backup integrity. zelta prune only suggests snapshots for deletion--it does not delete them. Output is provided in a format suitable for review before execu- tion. As with other Zelta commands, zelta prune works recursively on dataset trees. Both source and target may be local or remote via ssh(1). Safety Criteria WARNING: zelta prune is a new feature currently in production testing and will be formally released in Zelta 1.2 (May 2026). A snapshot is considered safe to prune only if: 1. The snapshot exists on the target (has been replicated) 2. The snapshot is older than the most recent common match point 3. The snapshot meets the minimum retention requirements Snapshots newer than the common match point are never suggested for deletion, as they may be needed for future incremental replication. Remote endpoint names follow scp(1) conventions. Dataset names follow zfs(8) naming conventions. OPTIONS Endpoint Arguments (Required) source The dataset tree containing snapshots to evaluate for pruning. target The backup dataset tree used to verify replication status. Output Options -v, --verbose Increase verbosity. Specify once for operational detail, twice (-vv) for debug output. -q, --quiet Quiet output. Specify once to suppress warnings, twice (-qq) to suppress errors. -n, --dryrun, --dry-run Display zfs commands without executing them. Retention Options --keep-snap-num N Minimum number of snapshots to keep after the match point. De- fault: 100. --keep-snap-days N Minimum age in days before a snapshot is eligible for deletion. Default: 90. --no-ranges Disable range compression in output. By default, consecutive snapshots are displayed as ranges (e.g., snap1%snap5). This op- tion outputs individual snapshot names, one per line. Dataset Options -d, --depth LEVELS Limit recursion depth. For example, a depth of 1 includes only the specified dataset. -X, --exclude PATTERN Exclude datasets matching the specified pattern. See zelta-op- tions(7) for pattern syntax. OUTPUT FORMAT By default, zelta prune outputs snapshot ranges using ZFS range syntax: pool/dataset@oldest_snap%newest_snap This format is compatible with zfs destroy for batch deletion. With --no-ranges, individual snapshot names are output one per line. EXAMPLES Identify prunable snapshots with default retention (100 snapshots, 90 days): zelta prune tank/data backup-host.example:tank/backups/data Use stricter retention (keep 200 snapshots, 180 days minimum age): zelta prune --keep-snap-num=200 --keep-snap-days=180 \ tank/data backup-host.example:tank/backups/data Output individual snapshots instead of ranges: zelta prune --no-ranges tank/data backup-host.example:tank/backups/data Review and then delete prunable snapshots: # First, review what would be deleted zelta prune tank/data backup:tank/backups/data # If satisfied, pipe to xargs for deletion (use with caution) zelta prune tank/data backup:tank/backups/data | xargs -n1 zfs destroy Exclude temporary datasets from consideration: zelta prune -X '*/tmp' tank/data backup:tank/backups/data EXIT STATUS Returns 0 on success, non-zero on error. NOTES zelta prune is experimental. Always review output before executing deletions. This command is driven by the zelta match comparison engine. See zelta-match(8) for details on how source and target snapshots are com- pared. See zelta-options(7) for environment variables and zelta.env configura- tion. SEE ALSO zelta(8), zelta-options(7), zelta-match(8), zelta-backup(8), zfs(8), zfs-destroy(8) AUTHORS Daniel J. Bell <bellhyve@zelta.space> WWW https://zelta.space zelta-prune(8)
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OUTPUT FORMAT | EXAMPLES | EXIT STATUS | NOTES | SEE ALSO | AUTHORS | WWW
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=zelta-prune&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>
