jthornber / blk-archive

Dedup and compress your device mapper devices. Works especially well with thin provisioning.
8 stars 3 forks source link

POC: send/receive/list #18

Open tasleson opened 2 weeks ago

tasleson commented 2 weeks ago

Experimental implementation of a client/server model for blk-archive which includes the ability to send (pack), receive (unpack), and list streams from a remote archive over TCP/IP.

Example:

$ blk-archive create -a the_archive_dir
$ blk-archive server -a the_archive_dir > /dev/null 2>&1 &
[1] 3701360

$ blk-archive send -s 127.0.0.1:9876 /tmp/some_file.bin 
Packing /tmp/some_file.bin ... [                                        ] Remaining 0s
Client is connecting to server using 127.0.0.1:9876
elapsed          : 2.412
stream id        : e767a7a94a70fd3b
file size        : 976.56M
mapped size      : 976.56M
total read       : 976.56M
fills size       : 0
duplicate data   : 0
data written     : 976.56M
hashes written   : 4.44M
stream written   : 447
ratio            : 1.00
speed            : 404.88M/s

$ blk-archive list -s 127.0.0.1:9876
e767a7a94a70fd3b 1024000000 Nov 07 24 15:44 some_file.bin

$ blk-archive receive -s 127.0.0.1:9876 --stream e767a7a94a70fd3b --create /tmp/deleteme.bin
speed            : 444.50M/s

Implementation details

Known issues/limitations

Misc.