| Disk ARchive 2.6.11 Full featured and portable backup and archiving tool

Public Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::archive_options_merge Class Reference
API

class holding optional parameters used to proceed to the merge operation More...

`#include <archive_options.hpp>`

Inherited by libdar5::archive_options_merge.

## Public Member Functions
| archive_options_merge (const archive_options_merge &ref)
| archive_options_merge (archive_options_merge &&ref) noexcept
archive_options_merge & | operator= (const archive_options_merge &ref)
archive_options_merge & | operator= (archive_options_merge &&ref) noexcept
void | clear ()
void | set_auxiliary_ref (std::shared_ptr< archive > ref)
void | set_selection (const mask &selection)
| defines the filenames to only save (except directory) as those that match the given mask
void | set_subtree (const mask &subtree)
| defines the directory and files to consider (this mask will be applied to the absolute path of files being proceeded)
void | set_allow_over (bool allow_over)
| defines whether overwritting is allowed or not
void | set_warn_over (bool warn_over)
| defines whether a warning shall be issued before overwriting
void | set_overwriting_rules (const crit_action &overwrite)
| policy to solve merging conflict
void | set_info_details (bool info_details)
| defines whether the user needs detailed output of the operation More...
void | set_display_treated (bool display_treated, bool only_dir)
| defines whether to show treated files More...
void | set_display_skipped (bool display_skipped)
| whether to display files that have been excluded by filters
void | set_pause (const infinint &pause)
| set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each slice, set to 2 makes libdar pause each 2 slices and so on.
void | set_empty_dir (bool empty_dir)
| defines whether we need to store ignored directories as empty
void | set_compression (compression compr_algo)
| set the compression algorithm to be used
void | set_compression_level (U_I compression_level)
| set the compression level (from 1 to 9)
void | set_slicing (const infinint &file_size, const infinint &first_file_size=0)
| define the archive slicing More...
void | set_ea_mask (const mask &ea_mask)
| defines which Extended Attributes to save
void | set_execute (const std::string &execute)
| set the command to execute after each slice creation More...
void | set_crypto_algo (crypto_algo crypto)
| set the cypher to use
void | set_crypto_pass (const secu_string &pass)
void | set_crypto_size (U_32 crypto_size)
| set the size of the encryption by block to use
void | set_gnupg_recipients (const std::vector< std::string > &gnupg_recipients)
void | set_gnupg_signatories (const std::vector< std::string > &gnupg_signatories)
| the private keys matching the email of the provided list are used to sign the archive random key
void | set_compr_mask (const mask &compr_mask)
| defines files to compress
void | set_min_compr_size (const infinint &min_compr_size)
| defines file size under which to never compress
void | set_empty (bool empty)
| defines whether we do a dry-run execution
void | set_keep_compressed (bool keep_compressed)
| make dar ignore the 'algo' argument and do not uncompress / compress files that are selected for merging
void | set_slice_permission (const std::string &slice_permission)
| if not an empty string set the slice permission according to the octal value given.
void | set_slice_user_ownership (const std::string &slice_user_ownership)
| if not an empty string set the user ownership of slices accordingly
void | set_slice_group_ownership (const std::string &slice_group_ownership)
| if not an empty string set the group ownership of slices accordingly
void | set_decremental_mode (bool mode)
| if set to true use a merging mode suitable to build a decremental backup from two full backups (see Notes)
void | set_sequential_marks (bool sequential)
| whether to activate escape sequence aka tape marks to allow sequential reading of the archive
void | set_sparse_file_min_size (const infinint &size)
| whether to try to detect sparse files
void | set_user_comment (const std::string &comment)
| specify a user comment in the archive (always in clear text!)
void | set_hash_algo (hash_algo hash)
| specify whether to produce a hash file of the slice and which hash algo to use
void | set_slice_min_digits (infinint val)
| defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as necessary to respect this
void | set_entrepot (const std::shared_ptr< entrepot > &entr)
| defines the protocol to use for slices
void | set_fsa_scope (const fsa_scope &scope)
| defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA are considered)
void | set_multi_threaded (bool val)
| whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (requires libthreadar)
void | set_delta_signature (bool val)
void | set_delta_mask (const mask &delta_mask)
| whether to derogate to defaut delta file consideration while calculation delta signatures
void | set_delta_sig_min_size (const infinint &val)
| whether to never calculate delta signature for files which size is smaller or equal to the given argument More...
void | set_iteration_count (const infinint &val)
| key derivation
void | set_kdf_hash (hash_algo algo)
| hash algo used for key derivation
void | set_sig_block_len (delta_sig_block_size val)
| block size to use to build delta signatures
std::shared_ptr< archive > | get_auxiliary_ref () const
const mask & | get_selection () const
const mask & | get_subtree () const
bool | get_allow_over () const
bool | get_warn_over () const
const crit_action & | get_overwriting_rules () const
bool | get_info_details () const
bool | get_display_treated () const
bool | get_display_treated_only_dir () const
bool | get_display_skipped () const
const infinint & | get_pause () const
bool | get_empty_dir () const
compression | get_compression () const
U_I | get_compression_level () const
const infinint & | get_slice_size () const
const infinint & | get_first_slice_size () const
const mask & | get_ea_mask () const
const std::string & | get_execute () const
crypto_algo | get_crypto_algo () const
const secu_string & | get_crypto_pass () const
U_32 | get_crypto_size () const
const std::vector< std::string > & | get_gnupg_recipients () const
const std::vector< std::string > & | get_gnupg_signatories () const
const mask & | get_compr_mask () const
const infinint & | get_min_compr_size () const
bool | get_empty () const
bool | get_keep_compressed () const
const std::string & | get_slice_permission () const
const std::string & | get_slice_user_ownership () const
const std::string & | get_slice_group_ownership () const
bool | get_decremental_mode () const
bool | get_sequential_marks () const
infinint | get_sparse_file_min_size () const
const std::string & | get_user_comment () const
hash_algo | get_hash_algo () const
infinint | get_slice_min_digits () const
const std::shared_ptr< entrepot > & | get_entrepot () const
const fsa_scope & | get_fsa_scope () const
bool | get_multi_threaded () const
bool | get_delta_signature () const
const mask & | get_delta_mask () const
bool | get_has_delta_mask_been_set () const
const infinint & | get_delta_sig_min_size () const
const infinint & | get_iteration_count () const
hash_algo | get_kdf_hash () const
delta_sig_block_size | get_sig_block_len () const

## Private Member Functions
void | destroy () noexcept
void | copy_from (const archive_options_merge &ref)
void | move_from (archive_options_merge &&ref) noexcept
void | nullifyptr () noexcept

## Private Attributes
std::shared_ptr< archive > | x_ref
mask * | x_selection
mask * | x_subtree
bool | x_allow_over
bool | x_warn_over
crit_action * | x_overwrite
bool | x_info_details
bool | x_display_treated
bool | x_display_treated_only_dir
bool | x_display_skipped
infinint | x_pause
bool | x_empty_dir
compression | x_compr_algo
U_I | x_compression_level
infinint | x_file_size
infinint | x_first_file_size
mask * | x_ea_mask
std::string | x_execute
crypto_algo | x_crypto
secu_string | x_pass
U_32 | x_crypto_size
std::vector< std::string > | x_gnupg_recipients
std::vector< std::string > | x_gnupg_signatories
mask * | x_compr_mask
infinint | x_min_compr_size
bool | x_empty
bool | x_keep_compressed
std::string | x_slice_permission
std::string | x_slice_user_ownership
std::string | x_slice_group_ownership
bool | x_decremental
bool | x_sequential_marks
infinint | x_sparse_file_min_size
std::string | x_user_comment
hash_algo | x_hash
infinint | x_slice_min_digits
std::shared_ptr< entrepot > | x_entrepot
fsa_scope | x_scope
bool | x_multi_threaded
bool | x_delta_signature
mask * | x_delta_mask
bool | has_delta_mask_been_set
infinint | x_delta_sig_min_size
infinint | x_iteration_count
hash_algo | x_kdf_hash
delta_sig_block_size | x_sig_block_len

## Detailed Description

class holding optional parameters used to proceed to the merge operation

Definition at line 900 of file archive_options.hpp.

## Member Function Documentation

## ◆ set_crypto_pass()

void libdar::archive_options_merge::set_crypto_pass | ( | const secu_string & | pass | ) |
| inline

set the pass the password / passphrase to use. Giving an empty string makes the password asked interactively through the dialog argument if encryption has been set.

Definition at line 997 of file archive_options.hpp.

## ◆ set_delta_sig_min_size()

void libdar::archive_options_merge::set_delta_sig_min_size | ( | const infinint & | val | ) |
| inline

whether to never calculate delta signature for files which size is smaller or equal to the given argument

Note
  by default a min size of 10 kiB is used

Definition at line 1070 of file archive_options.hpp.

## ◆ set_delta_signature()

void libdar::archive_options_merge::set_delta_signature | ( | bool | val | ) |
| inline

whether signature to base binary delta on the future has to be calculated and stored beside saved files

Note
  the default is true, which lead to preserve delta signature over merging, but not to calculate new ones unless a mask is given to set_delta_mask() in which case signature are dropped / preserved / added in regard to this mask. If set_delta_signature() is false, providing a mask has no effect, no signature will be transfered nor calculated in the resulting merged archive.

Definition at line 1062 of file archive_options.hpp.

## ◆ set_display_treated()

void libdar::archive_options_merge::set_display_treated | ( | bool | display_treated,
|  | bool | only_dir
| ) |  |
| inline

defines whether to show treated files

Parameters

  [in] | display_treated | true to display processed inodes
  [in] | only_dir | only display the current directory under processing, not its individual files

Definition at line 945 of file archive_options.hpp.

## ◆ set_execute()

void libdar::archive_options_merge::set_execute | ( | const std::string & | execute | ) |
| inline

set the command to execute after each slice creation

several macros are available:

- %n : the number of the just created slice
- %N : the slice number with padded zeros according to slice_min_digits given option
- %b : the archive basename
- %p : the slices path
- %e : the archive extension (usually "dar")
- %c : the archive context ("init", "operation" or "last_slice") see dar(1) man page for more details
- %%% : substitued by %%

Definition at line 990 of file archive_options.hpp.

## ◆ set_gnupg_recipients()

void libdar::archive_options_merge::set_gnupg_recipients | ( | const std::vector< std::string > & | gnupg_recipients | ) |
| inline

set the list of recipients that will be able to read the archive

Note
  more details for the same option of archive_options_create

Definition at line 1004 of file archive_options.hpp.

## ◆ set_info_details()

void libdar::archive_options_merge::set_info_details | ( | bool | info_details | ) |
| inline

defines whether the user needs detailed output of the operation

Note
  in API 5.5.x and before this switch drove the displaying of processing messages and treated files. now it only drives the display of processing messages, use set_display_treated to define whether files under treatement should be display or not

Definition at line 939 of file archive_options.hpp.

## ◆ set_slicing()

void libdar::archive_options_merge::set_slicing | ( | const infinint & | file_size,
|  | const infinint & | first_file_size = `0`
| ) |  |
| inline

define the archive slicing

Parameters

  [in] | file_size | set the slice size in byte (0 for a single slice whatever its size is)
  [in] | first_file_size | set the first file size

Note
  if not specified or set to zero, first_file_size is considered equal to file_size

Definition at line 967 of file archive_options.hpp.

The documentation for this class was generated from the following file:

- archive_options.hpp