BTRFS-BACKUP-NG-ESTIMATE(1)
π BTRFS-BACKUP-NG-ESTIMATE(1) π
okay bestie, welcome to Section 1: User Commands of the manual β this is btrfs-backup-ng-estimate, and she is literally the β¨vibe-checkerβ¨ of your backup game. Before you yeet a terabyte across the network, you ask her "hey, how big is this gonna be, and will it even fit?" π¦
β¨ NAME β¨
btrfs-backup-ng-estimate β estimate backup transfer sizes and check destination space. no cap, that's the whole job π
πΈ SYNOPSIS πΈ
btrfs-backup-ng estimate [OPTIONS] SOURCE DESTINATION
btrfs-backup-ng estimate --volume PATH [--target INDEX] [--check-space]
two modes, pick your fighter π
π«Ά DESCRIPTION π«Ά
So the whole thing here is: she calculates and displays estimated transfer sizes for backup operations before you actually run them. Optionally she'll also verify that your destination has enough space, and yeah she's aware of btrfs quotas (qgroups) because she's thorough like that π
This is lowkey a lifesaver for:
- Planning bandwidth usage and backup windows πΆ
- Verifying expected transfer sizes before proceeding
- Checking destination space availability before transfers fail (iconic, honestly)
- Scripting and automation decisions π€
The estimate command analyzes which snapshots need to be transferred and calculates their sizes using multiple methods for accuracy. multiple. methods. for. accuracy. she's an overachiever and we love her for it π
π ARGUMENTS π
- SOURCE β Source snapshot location (local path or
ssh://user@host:/path). where the tea is coming from β - DESTINATION β Backup destination (local path or
ssh://user@host:/path). where it's going π
π OPTIONS π
π Config-Driven Options
-c,--configFILE β Path to configuration file. your lil settings bestie π--volumePATH β Estimate for volume defined in config (e.g.,/home). Uses the backup target(s) configured for that volume.--targetINDEX β Target index to estimate for (0-based). Default: first target (0).--skip-remote-lockβ Proceed even if a lock cannot be recorded on the remote target. Only safe when nothing else can prune this target during the run.
β οΈ bestie. read that again. only safe when nothing else can prune this target during the run. don't be reckless, she's warning you fr fr π
--timestamp-formatFMT βstrftimeformat for parsing snapshot timestamps in direct mode (defaults to the config's[global] timestamp_format, else the built-in).
πΈ Filtering Options
--prefixPREFIX β Filter snapshots by prefix. narrowing it down, cute π―
π¦ SSH Options
--ssh-sudoβ Use sudo for btrfs commands on the remote host.--ssh-keyFILE β Path to SSH private key file. π--ssh-auth-sockPATH β Explicit ssh-agent socket (overrides auto-discovery; useful under sudo).--ssh-host-key-policyPOLICY β Host-key verification for this run:accept-new(default) orstrict.
β Space Checking Options
--check-spaceβ Check if the destination has sufficient space for the estimated transfer. When enabled, queries both filesystem free space and btrfs quota limits (if quotas are enabled), using the more restrictive value. she takes the stricter one because she's looking out for you π«Ά--safety-marginPERCENT β Safety margin percentage to add to required space calculation. Default is10%. A minimum of100 MiBis always applied regardless of the percentage. (yes, even if you set it to like 1%. the 100 MiB floor is non-negotiable, periodt.)
π§ Filesystem Check Options
--fs-checksMODE β Filesystem verification mode. Valid values:autoβ (Default) Warn about issues but continue operation. chill but observantstrictβ Error out on filesystem check failures. no mercy, slay πskipβ Bypass all filesystem verification checks. living dangerously π
--no-fs-checksβ Skip btrfs subvolume verification. Alias for--fs-checks=skip.
π Output Options
--jsonβ Output results in JSON format for scripting. When--check-spaceis enabled, includes aspace_checkobject with detailed space information including quota data. for the automation girlies π€β¨
π ESTIMATION METHODS π
She uses multiple methods to determine snapshot sizes, in order of preference:
btrfs subvolume showβ Uses exclusive data size (most accurate, requires quotas enabled)btrfs filesystem duβ Handles reflinks and deduplication correctlyduβ Fallback when btrfs commands aren't available
For incremental transfers, the command uses btrfs send --no-data to estimate the delta size without actually transferring data. she's just peeking, not touching, it's giving respectful π
β¨ OUTPUT FORMAT β¨
The default output shows a table with:
- Snapshot name
- Size (incremental or full)
- Transfer type (incremental or full)
- Parent snapshot (for incremental)
Followed by totals for data to transfer and estimation time. receipts, basically π§Ύ
π JSON OUTPUT π
With --json, the output includes:
source,destinationpathssnapshot_count,new_snapshot_count,skipped_counttotal_transfer_bytes,total_transfer_humantotal_full_bytes,total_full_humanestimation_time_secondssnapshotsarray with details for each snapshot
perfect for piping into your lil scripts, iykyk π
π EXAMPLES π
Estimate transfer for direct paths:
btrfs-backup-ng estimate /mnt/snapshots /mnt/backup
Estimate for remote backup:
btrfs-backup-ng estimate /home/.snapshots ssh://backup@server:/backups/home
Estimate using configuration file:
btrfs-backup-ng estimate --volume /home
Estimate for specific target:
btrfs-backup-ng estimate --volume /home --target 1
Estimate with destination space check:
btrfs-backup-ng estimate --volume /home --check-space
Space check with custom safety margin (20%):
btrfs-backup-ng estimate /mnt/snapshots /mnt/backup --check-space --safety-margin 20
JSON output with space check for scripting:
btrfs-backup-ng estimate --volume /home --check-space --json
Check if backup will fit (bash example using built-in space check):
if ! btrfs-backup-ng estimate --volume /home --check-space --json | \
jq -e '.space_check.sufficient' > /dev/null; then
echo "Warning: Not enough space for backup"
exit 1
fi
like?? she's a whole devops girlie π
π₯ SPACE CHECK OUTPUT π₯
When --check-space is enabled, the output includes a destination space check section showing:
- Filesystem space: Available and total space on the destination filesystem
- Quota limit: If btrfs quotas are enabled, shows the quota limit, current usage, and remaining space
- Effective limit: The more restrictive of filesystem space or quota remaining
- Required: Estimated transfer size plus safety margin
- Status:
OKorINSUFFICIENTwith details
Example output with quotas:
Destination Space Check
------------------------------------------------------------
Filesystem space: 850.00 GiB available of 1.00 TiB
Quota limit: 100.00 GiB (45.50 GiB used, 54.50 GiB remaining)
Effective limit: 54.50 GiB (quota is more restrictive)
Required: 2.49 GiB (+ 10% safety margin = 2.74 GiB)
Status: OK - Sufficient space available
look at her, doing the math for you ππ
πΈ NOTES πΈ
- Estimates are approximate and actual transfer sizes may vary slightly due to btrfs stream overhead and compression. she said approximate, don't come for her π
- Incremental estimates require the parent snapshot to exist.
- The estimation process is read-only and does not modify any data. π«Ά safe, respectful, consensual
- For large backup sets, estimation may take several minutes. grab a snack π
- Space checking queries quota information using
btrfs qgroup show. If quotas are not enabled, only filesystem space is checked.
π¦ SEE ALSO π¦
btrfs-backup-ng(1), btrfs-backup-ng-run(1), btrfs-backup-ng-transfer(1) β the rest of the friend group, go say hi π
π COPYRIGHT π
Copyright 2024-present Michael Berry.
License: MIT License
okay that's the whole page, bestie π
and for the sign-off: this was the btrfs-backup-ng manual page, dated January 2026 β go forth and estimate responsibly, mwah ππβ¨
π¦ where this page comes from
- fedora 43: btrfs-backup-ng 0.9.20-2.fc43 Β· MIT
- fedora 44: btrfs-backup-ng 0.9.20-1.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms