btrsync.sync.root¶
Generic interface to a btrfs filesystem.
Classes
Abstract base class for implementing btrfs roots. |
- class btrsync.sync.root.BtrfsRoot[source]¶
Abstract base class for implementing btrfs roots.
- abstract async classmethod get_root(path, **kwargs)[source]¶
Determine the subvolume root containing path and return a btrfs root instance anchored there.
- Parameters
path – the path to examine
kwargs – keyword arguments passed on to the btrfs root constructor
- Returns
a tuple
(root, relpath)containing the requested btrfs root instance along with the component of path relative to the root path- Raises
BtrfsError – if the operation fails
- abstract async classmethod is_root(path)[source]¶
Return whether path points to a btrfs subvolume root or not.
- abstract async list()[source]¶
List available subvolumes within this root, as a sequence of COW hierarchy roots.
- abstract async receive(fildes, path='.')[source]¶
Perform a receive operation into path using the send stream provided by fildes.
- abstract async send(*paths, parent=None, clones=[])[source]¶
Set up a send operation of paths with parent parent and clones clones.
- Parameters
paths – the paths of the subvolumes to send
parent – if not
None, the path of the parent subvolume to use for incremental sendclones – sequence of paths of clone subvolumes
- Returns
a tuple
(fildes, send_coro)containing the send stream and a coroutine that finalizes the send operation when run
Exceptions
Exception class encapsulating btrfs-specific errors. |
- exception btrsync.sync.root.BtrfsError[source]¶
Exception class encapsulating btrfs-specific errors.
Modules
Btrfs roots implemented using locally executed |
|
Btrfs roots for remote access via SSH. |