btrsync.btrfs.cmd¶
Programmatically generate btrfs subcommand invocations.
Functions
|
Generate a |
|
Generate a |
|
Generate a |
|
Generate a |
- btrsync.btrfs.cmd.list(path, *, list_all=False, readonly=False, fields='pcguqR')[source]¶
Generate a
btrfs subvolume listcommand.- Parameters
path – the target path to list
list_all – if
True, list all subvolumes in the filesystem (btrfs option-a), otherwise only direct descendants of path (btrfs option-o)readonly – if
True, list only readonly subvolumes (btrfs option-r)fields – flags selecting the subvolume fields to print (see
btrfs-subvolume(8)); default is all supported
- Returns
btrsync.util.Cmdinstance of the desired btrfs list command- Raises
ValueError – if unsupported fields are supplied
- btrsync.btrfs.cmd.receive(path, *, force_decompress=False)[source]¶
Generate a
btrfs receivecommand.- Parameters
path – the path to receive into
force_decompress – if
True, force the decompression of any compressed blocks in the stream (btrfs-receive option--force-decompress)
- Returns
btrsync.util.Cmdinstance of the desired btrfs receive command
- btrsync.btrfs.cmd.send(*paths, parent=None, clones=[], keep_compressed=False)[source]¶
Generate a
btrfs sendcommand.- Parameters
paths – the target paths to send
parent – path of the parent volume for incremental sends (btrfs-send option
-p)clones – sequence of paths of clone subvolumes (btrfs-send option
-c)keep_compressed – if
Trueinstruct btrfs-send to output compressed blocks unchanged (btrfs-send option--compressed-data)
- Returns
btrsync.util.Cmdinstance of the desired btrfs send command- Raises
ValueError – if no paths are given
- btrsync.btrfs.cmd.show(path, *, uuid=None, rootid=None)[source]¶
Generate a
btrfs subvolume showcommand.- Parameters
path – path of the target subvolume or filesystem
uuid – show information about subvolume with specified UUID; cannot be used together with rootid
rootid – show information about subvolume with specified root ID; cannot be used together with uuid
- Returns
btrsync.util.Cmdinstance of the desired btrfs show command- Raises
ValueError – if both uuid and rootid are specified