The freezer.engine.rsyncv2.rsyncv2 Module

The freezer.engine.rsyncv2.rsyncv2 Module

Freezer rsync incremental engine

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.engine.rsyncv2.rsyncv2.Rsyncv2Engine(**kwargs)

Bases: freezer.engine.engine.BackupEngine

backup_data(backup_path, manifest_path)

Execute backup using rsync algorithm.

If an existing rsync meta data for file is available - the backup will be incremental, otherwise will be executed a level 0 backup.

  • backup_path – Path to backup
  • manifest_path – Path to backup metadata
get_sign_delta(fs_path, manifest_path, write_queue)

Compute the file or fs tree path signatures.

Return blocks of changed data.

  • fs_path
  • manifest_path
  • write_queue

restore_level(restore_path, read_pipe, backup, except_queue)

Restore the provided backup into restore_abs_path.

Decrypt backup content if encrypted. Freezer rsync header data structure:

[ {
    'path': '' (path to file),
    'inode': {
        'mode': st_mode,
        'dev': st_dev,
        'uname': username,
        'gname': groupname,
        'atime': st_atime,
        'mtime': st_mtime,
        'size': st_size
    } (optional if file removed),
   'lname': 'link_name' (optional if symlink),
   'prev_name': '' (optional if renamed),
   'new_level': True (optional if incremental),
   'deleted': True (optional if removed),
   'deltas': len_of_blocks, [modified blocks] (if patch)
  • restore_path – Path where to restore file(s)
  • read_pipe – ackup data
  • backup – Backup info
  • except_queue – Queue for exceptions
write_engine_meta(manifest_path, files_meta)
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.