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)[source]

Add volume info vi to manifest and write to manifest

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

@return: void

check_dirinfo()[source]

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

del_volume_info(vol_num)[source]

Remove volume vol_num from the manifest

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

@return: void

from_string(s)[source]

Initialize self from string s, return self

get_containing_volumes(index_prefix)[source]

Return list of volume numbers that may contain index_prefix

get_files_changed()[source]
set_dirinfo()[source]

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

@rtype: Manifest @return: manifest

set_files_changed_info(files_changed)[source]
to_string()[source]

Return string version of self (just concatenate vi strings)

@rtype: string @return: self in string form

write_to_path(path)[source]

Write string version of manifest to given path

exception duplicity.manifest.ManifestError[source]

Bases: exceptions.Exception

Exception raised when problem with manifest

duplicity.manifest.Quote(s)[source]

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

duplicity.manifest.Unquote(quoted_string)[source]

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.

from_string(s)[source]

Initialize self from string s as created by to_string

get_best_hash()[source]

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.

to_string()[source]

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