https://github.com/veeam/blksnap
Linuxの汎用的なブロックデバイスでスナップショットが取得できるようになるもの. Veeam社のVeeam Agent for Linux の veeamsnap モジュールを元にLinux kernel に合わせて再実装したもののようで,Linux kernel に取り込まれるのを望んでいる.
一般的にLinuxでのスナップショットはLVMかbtrfsやnilfs2(やOpenZFS)のにようにファイルシステムにスナップショットの機能がないと取得できない. Blksnap を使うとこれらの制限なくスナップショットが取得できるようになるよう. LVMを設定しなかった環境などでスナップショットを取得するのにBlksnapを入れればシステムを作り直さずにスナップショットを取得したり,fatなどでもスナップショットを取得できそう.
現時点ではamd64 のみ,arm64 はテストは通り,ppc64le はシステムクラッシュ.
.debian package での例
$ sudo apt install gcc linux-headers-$(uname -r) $ sudo apt install debhelper dkms $ sudo apt install g++ cmake uuid-dev libboost-program-options-dev libboost-filesystem-dev $ git clone https://github.com/veeam/blksnap && cd blksnap $ # module $ cd ./pkg/deb $ ./build-blksnap-dkms.sh ${VERSION} $ cd ../.. $ # tool $ cd ./pkg/deb/blksnap-tools $ ./build.sh ${VERSION} $ sudo apt install ../../../build/blksnap-dkms_1.0.0.0_all.deb ../../../build/blksnap-tools_1.0.0.0_amd64.deb
$ /usr/sbin/blksnap --help [TBD]Usage: --help, -h or help: Print this usage. <command> [arguments]: Execute the management command. Available commands with arguments: setlog: Set module additional logging. -h [ --help ] [TBD]Print usage for command. -l [ --level ] arg (=6) 3 - only errors, 4 - warnings, 5 - notice, 6 - info (default), 7 - debug. -p [ --path ] arg Full path for log file. --disable Disable additional logging. snapshot_appendstorage: [TBD]Append space in difference storage for snapshot. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Snapshot uuid. -d [ --device ] arg [TBD]Device name. -r [ --range ] arg [TBD]Sectors range in format 'sector:count'. It's multitoken argument. -f [ --file ] arg [TBD]File for diff storage instead --device. snapshot_collect: [TBD]Get collection of devices and his snapshot images. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Optional parameter snapshot uuid. -j [ --json ] [TBD]Use json format for output. snapshot_create: [TBD]Create snapshot object structure. -h [ --help ] [TBD]Print usage for command. -d [ --device ] arg [TBD]Device for snapshot. It's multitoken argument. snapshot_destroy: [TBD]Release snapshot and destroy snapshot object. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Snapshot uuid. snapshot_take: [TBD]Take snapshot. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Snapshot uuid. snapshot_waitevent: [TBD]Wait and read event from snapshot. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Snapshot uuid. -t [ --timeout ] arg [TBD]The allowed waiting time for the event in milliseconds. -j [ --json ] [TBD]Use json format for output. stretch_snapshot: [TBD]Start stretch snapshot service. -h [ --help ] [TBD]Print usage for command. -i [ --id ] arg [TBD]Snapshot uuid. -p [ --path ] arg [TBD]Path for diff storage files. -l [ --limit ] arg [TBD]Available diff storage size in MiB. tracker_collect: [TBD]Collect block devices with change tracking. -h [ --help ] [TBD]Print usage for command. -j [ --json ] [TBD]Use json format for output. tracker_markdirtyblock: [TBD]Mark blocks as changed in change tracking map. -h [ --help ] [TBD]Print usage for command. -f [ --file ] arg [TBD]File name with dirty blocks. -d [ --device ] arg [TBD]Device name. -r [ --ranges ] arg [TBD]Sectors range in format 'sector:count'. It's multitoken argument. tracker_readcbtmap: [TBD]Read change tracking map. -h [ --help ] [TBD]Print usage for command. -d [ --device ] arg [TBD]Device name. -f [ --file ] arg [TBD]File name for output. -j [ --json ] [TBD]Use json format for output. tracker_remove: [TBD]Remove block device from change tracking. -h [ --help ] [TBD]Print usage for command. -d [ --device ] arg [TBD]Device name. version: [TBD]Print module version. -h [ --help ] [TBD]Print usage for command. -m [ --modification ] [TBD]Print module modification name. -c [ --compatibility ] [TBD]Print compatibility flag value in decimal form. -j [ --json ] [TBD]Use json format for output.
renges?
$ sudo /usr/sbin/blksnap snapshot_appendstorage --device /dev/sdb1 --id E377-F78D --range 512:976771120 Argument 'ranges' is missed.
コメント