Expand description
Module to work with a btrfs send stream
For additional documentation on BTRFS Send Stream, please see: btrfs.readthedocs.io - dev-send-stream.
§Example
The following example creates a blocking send stream from source, where send command will be
handled by handler.
use libbtrfs::send_stream;
use std::fs::File;
// read-only source subvolume
let source = File::open("/path/to/read-only/subvolume")?;
// mountpoint where the subvolume will be received
let mount = File::open("/receive/destination")?;
// handler for send commands
let handler = send_stream::handler::HandleFull::new(mount)?;
send_stream::SendBuilder::new(source)
.handler(handler)
.blocking_send()?;
Modules§
- handler
- Module for handling send commands.
Structs§
- Send
Builder - Builds a send stream.
- Send
Handle - Joinable handle returned by
SendBuilder::spawn_send().
Functions§
- receive_
stream - Receives a BTRFS stream.