hardlinks_mod module¶

Manage a list of hardlinks for a given backup; Also provides classes for hardlink restores.

class hardlinks_mod.Restore_hardlinks(backup_id)[source]¶

Bases: object

A class for dealing with restoration of hardlinks

backup_id = None¶
prior_file_for_hardlink(deviceno, inodeno, filename)[source]¶

If this isn’t a hardlinked file (in the backup), return None. If this is a hardlinked file, but it’s the first time we’ve encountered the inode, save the filename and return None. If this is a hardlinked file, and we’ve seen the inode number previously, return the filename to which we should hardlink.

class hardlinks_mod.Restore_inode(inodeno, ideal_count)[source]¶

Bases: object

Class to hold inode data

get_filename()[source]¶

Return the single filename associated with the first occurrence of this device+inode pair

set_filename(filename)[source]¶

Associate a single filename with the first occurrence of this device+inode pair

class hardlinks_mod.Save_device(deviceno)[source]¶

Bases: object

Class to hold data related to a particular “device” on save - in unix/linux filesystems, this means a filesystem

expected_size = None¶
write(file_)[source]¶

Write the list of duplicate inodes for this device

class hardlinks_mod.Save_hardlinks(backup_id, expected_size)[source]¶

Bases: object

Create a collection of duplicate inodes within the devices (filesystems) in which they appear

backup_id = None¶
close()[source]¶

Write the device # and inode # data we’ve collected

hardlinks_mod.one()[source]¶

A simple function that returns one, so our defaultdict can default to 1

backshift

Navigation

Contents:

  • backshift_file_mod module
  • backshift_os_mod module
  • base255 module
  • bloom_filter_mod module
  • bufsock module
  • cacher_mod module
  • chunk_mod module
  • comma_mod module
  • compressed_file_mod module
  • compressed_string_mod module
  • conf module
  • constants_mod module
  • db_mod module
  • dirops_mod module
  • dohdbm module
  • escape_mod module
  • expire_mod module
  • file_count_mod module
  • get_chunk module
  • hardlinks_mod module
  • helpers module
  • main module
  • metadata_mod module
  • modunits module
  • py_treap module
  • python2x3 module
  • readline0 module
  • repo_mod module
  • rolling_checksum_mod module
  • rolling_checksum_py_mod module
  • rolling_checksum_pyx_mod module
  • saveset_files_mod module
  • saveset_summary_mod module
  • setup module
  • stringio module
  • treap module
  • try_psyco module
  • xz_mod module

Related Topics

  • Documentation overview
    • Previous: get_chunk module
    • Next: helpers module

Quick search

©2021, Author. | Powered by Sphinx 4.1.2 & Alabaster 0.7.12 | Page source