freezer.engine.tar.tar_builders module

freezer.engine.tar.tar_builders module

Freezer Tar related functions

class freezer.engine.tar.tar_builders.TarCommandBuilder(filepath, compression_algo, is_windows, tar_path=None)

Bases: object

Building a tar cmd command. To build command invoke method build.

DEREFERENCE_MODE = {'all': '--hard-dereference --dereference', 'hard': '--hard-dereference', 'soft': '--dereference'}
LISTED_TEMPLATE = '{tar_command} --listed-incremental={listed_incremental}'
UNIX_TEMPLATE = '{gnutar_path} --create {algo} --warning=none --no-check-device --one-file-system --preserve-permissions --same-owner --seek --ignore-failed-read'
WINDOWS_TEMPLATE = '{gnutar_path} -c {algo} --incremental --unlink-first --ignore-zeros'
build()
set_dereference(mode)
Dereference hard and soft links according option choices.
‘soft’ dereference soft links, ‘hard’ dereference hardlinks, ‘all’ dereference both. Default ‘None’.
set_encryption(encrypt_pass_file, openssl_path=None)
set_exclude(exclude)
set_listed_incremental(absolute_path)
class freezer.engine.tar.tar_builders.TarCommandRestoreBuilder(restore_path, compression_algo, is_windows, tar_path=None)

Bases: object

DRY_RUN_TEMPLATE = '{0} {1} --incremental --list --ignore-zeros --warning=none'
OPENSSL_DEC = '{openssl_path} enc -d -aes-256-cfb -pass file:{file}'
UNIX_TEMPLATE = '{0} {1} --incremental --extract --ignore-zeros --warning=none --overwrite --directory {2}'
WINDOWS_TEMPLATE = '{0} -x {1} --incremental --unlink-first --ignore-zeros'
build()
set_dry_run()
set_encryption(encrypt_pass_file, openssl_path=None)
freezer.engine.tar.tar_builders.get_tar_flag_from_algo(compression)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.