The freezer.engine.tar.tar_builders Module

The freezer.engine.tar.tar_builders Module

  1. Copyright 2014,2015 Hewlett-Packard Development Company, L.P.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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.

freezer 6.0.1.dev8