The freezer.storage.physical Module

  1. Copyright 2016 Hewlett-Packard Enterprise 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.

class freezer.storage.physical.PhysicalStorage(storage_path, max_segment_size, skip_prepare=False)[source]

Bases: freezer.storage.base.Storage

Backup like Swift, SSH or Local. Something that represents real storage. For example MultipleStorage is not physical.

backup_blocks(backup)[source]
Parameters:backup (freezer.storage.base.Backup) –
Returns:
get_level_zero(engine, hostname_backup_name, recent_to_date=None)[source]

Gets backups by backup_name and hostname

Parameters:
  • engine (freezer.engine.engine.BackupEngine) – Search for backups made by specified engine
  • hostname_backup_name (str) – Search for backup with specified name
  • recent_to_date (int) –
Return type:

list[freezer.storage.base.Backup]

Returns:

dictionary of level zero timestamps with attached storage

listdir(path)[source]
Parameters:path (str) –
Return type:collections.Iterable[str]
metadata_path(engine, hostname_backup_name)[source]
put_metadata(engine_metadata_path, freezer_metadata_path, backup)[source]
Parameters:
Returns:

rmtree(path)[source]