duplicity.manifest module¶
Create and edit manifest for session contents
- class duplicity.manifest.Manifest(fh=None)[source]¶
Bases:
object
List of volumes and information about each one
- __init__(fh=None)[source]¶
Create blank Manifest
@param fh: fileobj for manifest @type fh: DupPath
@rtype: Manifest @return: manifest
- 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
- get_containing_volumes(index_prefix)[source]¶
Return list of volume numbers that may contain index_prefix
- set_dirinfo()[source]¶
Set information about directory from config, and write to manifest file.
@rtype: Manifest @return: manifest
- exception duplicity.manifest.ManifestError[source]¶
Bases:
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]¶
Bases:
object
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.
- 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.