Backup class used to create backups
'''
- def __init__(self, excluded_files=[], max_volume_size,
- included_files=[], filter_func=None, mode="tar",
- password=None, logger=None, index_encrypted=True,
- index_name_func=None, volume_name_func=None):
+ def __init__(self, excluded_files=[], included_files=[],
+ filter_func=None, mode="tar", password=None, logger=None,
+ index_encrypted=True, index_name_func=None,
+ volume_name_func=None):
'''
Constructor. Configures the diff engine.
'''
pass
- def create_full_backup(self, source_path, backup_path):
+ def create_full_backup(self, source_path, backup_path,
+ max_volume_size=None):
'''
Creates a full backup.
- source_path: source path to the directory to back up.
- backup_path: path where the back up will be stored. Backup path will
be created if not existent.
+ - max_volume_size: maximum volume size. Used to split the backup in
+ volumes. Optional (won't split in volumes by default).
'''
pass
- def create_diff_backup(self, source_path, backup_path, previous_index_path):
+ def create_diff_backup(self, source_path, backup_path, previous_index_path,
+ max_volume_size=None):
'''
Creates a backup.
be created if not existent.
- previous_index_path: index of the previous backup, needed to know
which files changed since then.
+ - max_volume_size: maximum volume size in megabytes (MB). Used to split
+ the backup in volumes. Optional (won't split in volumes by default).
'''
pass
- def restore_backup(self, target_path, backup_indexes_paths=[], backup_tar_path=None):
+ def restore_backup(self, target_path, backup_indexes_paths=[],
+ backup_tar_path=None):
'''
Restores a backup.
deltatar = DeltaTar(
# these options are the same as in tarfile:
mode="tar#gz.aes128",
- max_volume_size=100*1024*1024, # 100MB
+ max_volume_size=100, # 100MB
index_name_func=index_name_func, # optional
volume_name_func=volume_name_func # optional
)