duplicity.backends.xorrisobackend module

class duplicity.backends.xorrisobackend.Xorriso(device, xorriso_path='xorriso', xorriso_args=None)[source]

Bases: object

Wrapper around a xorriso subprocess.

__handle_xorriso_error(stderr)

Detect errors from stderr of xorriso. Convert the errors into exceptions.

__init__(device, xorriso_path='xorriso', xorriso_args=None)[source]
__recv_stdout_stderr()
__send_cmd(*args)
__start_subprocess(commandline)
commit()[source]

Commit changes and write them to the image.

cp(files, dest)[source]

Copy file to the ISO image. Does not commit the changes yet.

end()[source]

Terminate the xorriso subprocess

extract(files, dest)[source]

Extract files from the ISO image.

ls(pattern='.')[source]

List files on optical disc.

lsl(pattern='.')[source]

List files on optical disc.

rm(files)[source]

Remove a list of files from the image. Does not commit the changes yet.

class duplicity.backends.xorrisobackend.XorrisoBackend(parsed_url)[source]

Bases: Backend

Backend for writing to optical discs or ISO images using xorriso.

Simple URLs look like xorriso:///dev/sr0 if the backup location is at the root of the filesystem. or if xorriso://dev/sr0:/path/to/a/directory/on/iso if the backup location is in a directory.

Especially for testing also an ISO file can be used: xorriso://path/to/image.iso

The path to the xorriso executable can be specified with teh XORRISO_PATH environment variable. Environment variables:

  • XORRISO_PATH: Alternative path to the xorriso executable

  • XORRISO_WRITE_SPEED: Specify the speed for writing to the optical disc. One of [“min”, “max”].

  • XORRISO_ASSERT_VOLID: Abort when the volume ID of the ISO image does not match the given value.

  • XORRISO_ARGS: Arbitrary arguments to xorriso, inserted before the filesystem operations. For experts only.

__init__(parsed_url)[source]
_close()[source]
_delete(filename)[source]
_delete_list(filenames)[source]
_get(filename, local_path)[source]
_list()[source]
_put(source_path, remote_filename)[source]
_query(filename)[source]