i am doing incremental snapshots with btrfs
using btrfs send
and btrfs receive
assuming i start from an initial snapshot snapshot_0
and send
the data to a file
$ sudo btrfs send snapshot_0 -f snapshot_0.data
then make some changes, create a fresh snapshot snapshot_1
and take a differential snapshot along the lines of
$ sudo btrfs send -p snapshot_0 snapshot_1 -f snapshot_0-1.data
now i have the two files snapshot_0.data
and snapshot_0-1.data
. i know i can use
$ sudo btrfs subvolume show snapshot_0
$ sudo btrfs subvolume show snapshot_1
in order to get the UUID
and the Parent UUID
(or Received UUID
) from the actual snapshots.
my question is: is there a way to get these UUID
s from my data files snapshot_0.data
and snapshot_0-1.data
?
update: i just found Design Notes on Send/Receive.
2nd update: btrfs-snapshots-diff.py
[github.com] may provide just that; investigating...
(i also posted the question over on unix.stackexchange.com).
starting from the code from btrfs-snapshots-diff.py [github.com] is was able to make a script tailored to my needs. i can use it this way to get the
uuid
s:with the class
BtrfsStream
as below.i made some modifications to the original code:
contextmanager
features in order to use it in awith
satementthe code is used is then: