duplicity.manifest module

Create and edit manifest for session contents

class duplicity.manifest.Manifest(fh=None)[source]

List of volumes and information about each one


Add volume info vi to manifest and write to manifest

@param vi: volume info to add @type vi: VolumeInfo

@return: void


Return None if dirinfo is the same, otherwise error message

Does not raise an error message if hostname or local_dirname are not available.

@rtype: string @return: None or error message


Remove volume vol_num from the manifest

@param vol_num: volume number to delete @type vi: int

@return: void


Initialize self from string s, return self


Return list of volume numbers that may contain index_prefix


Set information about directory from globals, and write to manifest file.

@rtype: Manifest @return: manifest


Return string version of self (just concatenate vi strings)

@rtype: string @return: self in string form


Write string version of manifest to given path

exception duplicity.manifest.ManifestError[source]

Bases: exceptions.Exception

Exception raised when problem with manifest


Return quoted version of s safe to put in a manifest or volume info


Return original string from quoted_string produced by above

class duplicity.manifest.VolumeInfo[source]

Information about a single volume

contains(index_prefix, recursive=1)[source]

Return true if volume might contain index

If recursive is true, then return true if any index starting with index_prefix could be contained. Otherwise, just check if index_prefix itself is between starting and ending indicies.


Initialize self from string s as created by to_string


Return pair (hash_type, hash_data)

SHA1 is the best hash, and MD5 is the second best hash. None is returned if no hash is available.

set_hash(hash_name, data)[source]

Set the value of hash hash_name (e.g. “MD5”) to data

set_info(vol_number, start_index, start_block, end_index, end_block)[source]

Set essential VolumeInfo information, return self

Call with starting and ending paths stored in the volume. If a multivol diff gets split between volumes, count it as being part of both volumes.


Return nicely formatted string reporting all information

exception duplicity.manifest.VolumeInfoError[source]

Bases: exceptions.Exception

Raised when there is a problem initializing a VolumeInfo from string