Skip to main content

Module send_stream

Module send_stream 

Source
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§

SendBuilder
Builds a send stream.
SendHandle
Joinable handle returned by SendBuilder::spawn_send().

Functions§

receive_stream
Receives a BTRFS stream.