the most tricky things are sometimes easiest to solve.
we provide lz4 patches - tested and build for - 3.12, 3.14, 3.15, 3.10 ...
https://github.com/xbianonpi/xbian-package-kernel/tree/master/patchesnt
then its needed to activate libkernel suppoer for lz4, lz4fast and of course appropriate compressors. all is in clasic kernel's make menuconfig.
lz4 is pre-created with XBian, once tag lz4 written (compress=lz4 used while mounting), btrfs mounter will refuse to load on kernels without the same support.
if this should be causing troubles (no possibility to compile custom kernel for other pc, or simply user doesn't want to bother with stuff) - I would recommend re-cloning to img (or disk directly) with lzo (or compress disabled) and then don't use compress=lz4 on mount.
(cmdline.txt although auto updated when needed (by xbian-update or kernel installation), there are some settings which are kept as user set them before. compress=XX is one of those.
(5th Sep, 2014 03:17 PM)f1vefour Wrote: [ -> ]I know it was implemented not for speed or space savings but for the online snapshot capabilities. This alone makes it worthwhile.
It doesn't really matter to me that much as I keep important files on an external disk. If something goes critically wrong with the system I just start from scratch. It would be nice to be able to use the snapshots to restore from a Linux PC however, this way a nonfunctional installation could be repaired with the snapshots on the disk.
@
f1vefour
as xbian-cloner using snapshot send | recv to create img or new part (as copy of local), the same way you can use it to send snap literally anywhere! now check this: (just for info, because snap stream is sent RAW, local & remote compat flags doesn't need to match !
Code:
btrfs send SNAP > filename
btrfs recv root < filename
file can be placed over net, on USB stick, printed out on printer and later retyped back
probably you know ssh can be called just to execute command on remote machine ... like this
Code:
ssh xbian@xbian echo "this is printed on vts on xbian"
then a bit more hacking would be
Code:
echo "this is sent TO xbian and echoed there" | ssh xbian@xbian cat
and
Code:
cat filename | ssh xbian@xbian "cat > openme"
finally going to
Code:
btrfs send SNAP | ssh xbian@xbian "cat > fileBACKUPofSNAP"
btrfs send SNAP | ssh xbian@xbian "btrfs recv BACKUPofSNAP"
this assumes btrfs filesystem on remote system OR just save to file as in first example - but directly to remote.
just be always aware that btrfs send has no quality and structure of mountable filesystem (can't be directly loop mounted). it is just raw CoW stream (so metadata and data as they were saved to local btrfs - like magnetic tape or even the back to '70 paper punch cards (having holes)...
so it needs to be restored to btrfs again:
Code:
cat file | btrfs recv ./
(backup home function is using that way to save /home subvolume into .gz file while uing btrfs recv later for restore (all atomic on open writeable filesystem in use).