digint / digint/btrbk

[Question] How to specify clone sources from snapshots of other unrelated subvolumes?

Open
#585 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
2.1k
Forks
139
PR merge metrics
No merged PRs in 30d

Description

In the configuration `incremental_prefs`, all options either requires matching snapshot_name, or a parent_uuid relationship. How can I let btrbk use snapshots of other unrelated subvolumes (different name/path) as clone sources? This is useful when they actually share many data because of `cp --reflink=always` or [dedeplication](https://github.com/Zygo/bees).

The docs of `incremental_prefs`:
```
sro,srn
All from snapshot_dir matching snapshot_name, with parent_uuid relationship, sorted by btrbk timestamp (o=older n=newer).
sao,san
All from snapshot_dir matching snapshot_name, sorted by btrbk timestamp (o=older n=newer).
aro,arn
All from incremental_resolve, with parent_uuid relationship, sorted by cgen (o=older n=newer).
```

My use case is like this: I have two subvolumes `active` and `archive`, with different backup strategy and snapshot period. Once a while, I move inactive/immutable data from `active` to `archive` via `cp --reflink=always && rm`. To avoid needlessly transfer and/or store two copies of data on the backup device, I'd like to specify clone sources of other subvolumes when sending one, like `btrfs send -p archive.old -c active.old archive.new`. How can I do this in btrbk?

I tried `incremental_prefs defaults,sao,san,aro,arn` as suggested by documentations, but it does not seem to add cross-subvolume clone sources.

BTW: I'm not sure how to check what command line is used on send. `btrbk dryrun` does not print the btrfs command line to be invoked. I checked these by ro-mount the target device and view the error output from `btrbk run`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the incremental_prefs documentation and the btrbk dryrun/send path, then reproduce the active/archive case using unrelated subvolumes and reflinked data. Determine how clone sources are currently selected and whether the invoked btrfs send command exposes them; done means cross-subvolume clone sources work for this case and the command can be inspected.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.