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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::archive_options_extract Class Reference
API

class holding optional parameters used to extract files from an existing archive More...

`#include <archive_options.hpp>`

## Public Types
enum | t_dirty { dirty_ignore , dirty_warn , dirty_ok }

## Public Member Functions
| archive_options_extract (const archive_options_extract &ref)
| archive_options_extract (archive_options_extract &&ref) noexcept
archive_options_extract & | operator= (const archive_options_extract &ref)
archive_options_extract & | operator= (archive_options_extract &&ref) noexcept
void | clear ()
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 directories and files to consider
void | set_warn_over (bool warn_over)
| defines whether a warning shall be issued before overwriting
void | set_info_details (bool info_details)
void | set_display_treated (bool display_treated, bool only_dir)
void | set_display_skipped (bool display_skipped)
| whether to display files that have been excluded by filters
void | set_ea_mask (const mask &ea_mask)
| defines which Extended Attributes to restore
void | set_flat (bool flat)
| whether to ignore directory structure and restore all files in the same directory
void | set_what_to_check (comparison_fields what_to_check)
| fields to consider when comparing inodes with those on filesystem to determine if it is more recent (see comparison_fields enumeration), also defines whether mtime has to be restored (cf_mtime) whether permission have to be too (cf_ignore_owner) whether ownership has to be restored too (cf_all)
void | set_warn_remove_no_match (bool warn_remove_no_match)
| whether a warning must be issue if a file to remove does not match the expected type of file
void | set_empty (bool empty)
| defines whether we need to store ignored directories as empty
void | set_empty_dir (bool empty_dir)
| whether to restore directories where no file has been triggered for backup (no file/inode change, excluded files,...)
void | set_dirty_behavior (bool ignore, bool warn)
| whether to restore dirty files (those that changed during backup), warn before restoring or ignoring them
void | set_dirty_behavior (t_dirty val)
| alternative method to modify dirty behavior
void | set_overwriting_rules (const crit_action &over)
| overwriting policy
void | set_only_deleted (bool val)
| only consider deleted files (if set, no data get restored)
void | set_ignore_deleted (bool val)
| do not consider deleted files (if set, no inode will be removed)
void | set_fsa_scope (const fsa_scope &scope)
| defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at compilation time are considered)
void | set_ignore_unix_sockets (bool val)
| whether to ignore unix sockets while restoring
void | set_in_place (bool arg)
| whether to ignore fs_root and use in-place path stored in the archive
const mask & | get_selection () const
const mask & | get_subtree () const
bool | get_warn_over () const
bool | get_info_details () const
bool | get_display_treated () const
bool | get_display_treated_only_dir () const
bool | get_display_skipped () const
const mask & | get_ea_mask () const
bool | get_flat () const
comparison_fields | get_what_to_check () const
bool | get_warn_remove_no_match () const
bool | get_empty () const
bool | get_empty_dir () const
t_dirty | get_dirty_behavior () const
const crit_action & | get_overwriting_rules () const
bool | get_only_deleted () const
bool | get_ignore_deleted () const
const fsa_scope & | get_fsa_scope () const
bool | get_ignore_unix_sockets () const
bool | get_in_place () const

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

## Private Attributes
mask * | x_selection
mask * | x_subtree
bool | x_warn_over
bool | x_info_details
bool | x_display_treated
bool | x_display_treated_only_dir
bool | x_display_skipped
mask * | x_ea_mask
bool | x_flat
comparison_fields | x_what_to_check
bool | x_warn_remove_no_match
bool | x_empty
bool | x_empty_dir
t_dirty | x_dirty
crit_action * | x_overwrite
bool | x_only_deleted
bool | x_ignore_deleted
fsa_scope | x_scope
bool | x_ignore_unix_sockets
bool | x_in_place

## Detailed Description

class holding optional parameters used to extract files from an existing archive

Definition at line 1350 of file archive_options.hpp.

## Member Enumeration Documentation

## ◆ t_dirty

enum libdar::archive_options_extract::t_dirty

Definition at line 1353 of file archive_options.hpp.

## Constructor & Destructor Documentation

## ◆ archive_options_extract() [1/3]

libdar::archive_options_extract::archive_options_extract | ( |  | ) |
| inline

Definition at line 1355 of file archive_options.hpp.

## ◆ archive_options_extract() [2/3]

libdar::archive_options_extract::archive_options_extract | ( | const archive_options_extract & | ref | ) |
| inline

Definition at line 1356 of file archive_options.hpp.

## ◆ archive_options_extract() [3/3]

libdar::archive_options_extract::archive_options_extract | ( | archive_options_extract && | ref | ) |
| inline noexcept

Definition at line 1357 of file archive_options.hpp.

## ◆ ~archive_options_extract()

libdar::archive_options_extract::~archive_options_extract | ( |  | ) |
| inline

Definition at line 1360 of file archive_options.hpp.

## Member Function Documentation

## ◆ get_dirty_behavior()

t_dirty libdar::archive_options_extract::get_dirty_behavior | ( |  | ) | const
| inline

Definition at line 1469 of file archive_options.hpp.

## ◆ get_display_skipped()

bool libdar::archive_options_extract::get_display_skipped | ( |  | ) | const
| inline

Definition at line 1462 of file archive_options.hpp.

## ◆ get_display_treated()

bool libdar::archive_options_extract::get_display_treated | ( |  | ) | const
| inline

Definition at line 1460 of file archive_options.hpp.

## ◆ get_display_treated_only_dir()

bool libdar::archive_options_extract::get_display_treated_only_dir | ( |  | ) | const
| inline

Definition at line 1461 of file archive_options.hpp.

## ◆ get_ea_mask()

const mask & libdar::archive_options_extract::get_ea_mask | ( |  | ) | const
| inline

Definition at line 1463 of file archive_options.hpp.

## ◆ get_empty()

bool libdar::archive_options_extract::get_empty | ( |  | ) | const
| inline

Definition at line 1467 of file archive_options.hpp.

## ◆ get_empty_dir()

bool libdar::archive_options_extract::get_empty_dir | ( |  | ) | const
| inline

Definition at line 1468 of file archive_options.hpp.

## ◆ get_flat()

bool libdar::archive_options_extract::get_flat | ( |  | ) | const
| inline

Definition at line 1464 of file archive_options.hpp.

## ◆ get_fsa_scope()

const fsa_scope & libdar::archive_options_extract::get_fsa_scope | ( |  | ) | const
| inline

Definition at line 1473 of file archive_options.hpp.

## ◆ get_ignore_deleted()

bool libdar::archive_options_extract::get_ignore_deleted | ( |  | ) | const
| inline

Definition at line 1472 of file archive_options.hpp.

## ◆ get_ignore_unix_sockets()

bool libdar::archive_options_extract::get_ignore_unix_sockets | ( |  | ) | const
| inline

Definition at line 1474 of file archive_options.hpp.

## ◆ get_in_place()

bool libdar::archive_options_extract::get_in_place | ( |  | ) | const
| inline

Definition at line 1475 of file archive_options.hpp.

## ◆ get_info_details()

bool libdar::archive_options_extract::get_info_details | ( |  | ) | const
| inline

Definition at line 1459 of file archive_options.hpp.

## ◆ get_only_deleted()

bool libdar::archive_options_extract::get_only_deleted | ( |  | ) | const
| inline

Definition at line 1471 of file archive_options.hpp.

## ◆ get_overwriting_rules()

const crit_action & libdar::archive_options_extract::get_overwriting_rules | ( |  | ) | const
| inline

Definition at line 1470 of file archive_options.hpp.

## ◆ get_selection()

const mask & libdar::archive_options_extract::get_selection | ( |  | ) | const
| inline

Definition at line 1456 of file archive_options.hpp.

## ◆ get_subtree()

const mask & libdar::archive_options_extract::get_subtree | ( |  | ) | const
| inline

Definition at line 1457 of file archive_options.hpp.

## ◆ get_warn_over()

bool libdar::archive_options_extract::get_warn_over | ( |  | ) | const
| inline

Definition at line 1458 of file archive_options.hpp.

## ◆ get_warn_remove_no_match()

bool libdar::archive_options_extract::get_warn_remove_no_match | ( |  | ) | const
| inline

Definition at line 1466 of file archive_options.hpp.

## ◆ get_what_to_check()

comparison_fields libdar::archive_options_extract::get_what_to_check | ( |  | ) | const
| inline

Definition at line 1465 of file archive_options.hpp.

## ◆ operator=() [1/2]

archive_options_extract & libdar::archive_options_extract::operator= | ( | archive_options_extract && | ref | ) |
| inline noexcept

Definition at line 1359 of file archive_options.hpp.

## ◆ operator=() [2/2]

archive_options_extract & libdar::archive_options_extract::operator= | ( | const archive_options_extract & | ref | ) |
| inline

Definition at line 1358 of file archive_options.hpp.

## ◆ set_dirty_behavior() [1/2]

void libdar::archive_options_extract::set_dirty_behavior | ( | bool | ignore,
|  | bool | warn )
| inline

whether to restore dirty files (those that changed during backup), warn before restoring or ignoring them

Parameters

  [in] | ignore | if set to true, dirty files are not restored at all
  [in] | warn | useless if ignored is false. If warn is true, a warning is issued before restoring each dirty file (default behavior)

Definition at line 1424 of file archive_options.hpp.

## ◆ set_dirty_behavior() [2/2]

void libdar::archive_options_extract::set_dirty_behavior | ( | t_dirty | val | ) |
| inline

alternative method to modify dirty behavior

Definition at line 1427 of file archive_options.hpp.

## ◆ set_display_skipped()

void libdar::archive_options_extract::set_display_skipped | ( | bool | display_skipped | ) |
| inline

whether to display files that have been excluded by filters

Definition at line 1400 of file archive_options.hpp.

## ◆ set_display_treated()

void libdar::archive_options_extract::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 1397 of file archive_options.hpp.

## ◆ set_empty()

void libdar::archive_options_extract::set_empty | ( | bool | empty | ) |
| inline

defines whether we need to store ignored directories as empty

Definition at line 1415 of file archive_options.hpp.

## ◆ set_empty_dir()

void libdar::archive_options_extract::set_empty_dir | ( | bool | empty_dir | ) |
| inline

whether to restore directories where no file has been triggered for backup (no file/inode change, excluded files,...)

Definition at line 1418 of file archive_options.hpp.

## ◆ set_flat()

void libdar::archive_options_extract::set_flat | ( | bool | flat | ) |
| inline

whether to ignore directory structure and restore all files in the same directory

Definition at line 1406 of file archive_options.hpp.

## ◆ set_fsa_scope()

void libdar::archive_options_extract::set_fsa_scope | ( | const fsa_scope & | scope | ) |
| inline

defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at compilation time are considered)

Definition at line 1444 of file archive_options.hpp.

## ◆ set_ignore_deleted()

void libdar::archive_options_extract::set_ignore_deleted | ( | bool | val | ) |
| inline

do not consider deleted files (if set, no inode will be removed)

Note
  setting both set_only_deleted() and set_ignore_deleted() will not restore anything, almost equivalent to a dry-run execution

Definition at line 1441 of file archive_options.hpp.

## ◆ set_ignore_unix_sockets()

void libdar::archive_options_extract::set_ignore_unix_sockets | ( | bool | val | ) |
| inline

whether to ignore unix sockets while restoring

Definition at line 1447 of file archive_options.hpp.

## ◆ set_in_place()

void libdar::archive_options_extract::set_in_place | ( | bool | arg | ) |
| inline

whether to ignore fs_root and use in-place path stored in the archive

Definition at line 1450 of file archive_options.hpp.

## ◆ set_info_details()

void libdar::archive_options_extract::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 1392 of file archive_options.hpp.

## ◆ set_only_deleted()

void libdar::archive_options_extract::set_only_deleted | ( | bool | val | ) |
| inline

only consider deleted files (if set, no data get restored)

Note
  setting both set_only_deleted() and set_ignore_deleted() will not restore anything, almost equivalent to a dry-run execution

Definition at line 1435 of file archive_options.hpp.

## ◆ set_subtree()

void libdar::archive_options_extract::set_subtree | ( | const mask & | subtree | ) |

defines the directories and files to consider

Note
  WARNING: The filter mechanism used here is common to all operations and works by comparing full paths, while in the other hand, paths stored in the libdar archive are all relative paths to what was provided as fs_root at backup time. To have this filter mecanism working in the context of restoration, libdar prepends the relative path found in the libdar archive with the fs_root argument given to archive::op_extract. In consequence the provided filter here, for extraction operation should be build taking into account that files to restore will be seen as subdirectories of this provided "fs_root" where the data will be restored. In other words, if the subtree mask do not accept anything under fs_root path, the resulting backup will be empty.

## ◆ set_warn_over()

void libdar::archive_options_extract::set_warn_over | ( | bool | warn_over | ) |
| inline

defines whether a warning shall be issued before overwriting

Definition at line 1384 of file archive_options.hpp.

## ◆ set_warn_remove_no_match()

void libdar::archive_options_extract::set_warn_remove_no_match | ( | bool | warn_remove_no_match | ) |
| inline

whether a warning must be issue if a file to remove does not match the expected type of file

Definition at line 1412 of file archive_options.hpp.

## ◆ set_what_to_check()

void libdar::archive_options_extract::set_what_to_check | ( | comparison_fields | what_to_check | ) |
| inline

fields to consider when comparing inodes with those on filesystem to determine if it is more recent (see comparison_fields enumeration), also defines whether mtime has to be restored (cf_mtime) whether permission have to be too (cf_ignore_owner) whether ownership has to be restored too (cf_all)

Definition at line 1409 of file archive_options.hpp.

## Member Data Documentation

## ◆ x_dirty

t_dirty libdar::archive_options_extract::x_dirty
| private

Definition at line 1491 of file archive_options.hpp.

## ◆ x_display_skipped

bool libdar::archive_options_extract::x_display_skipped
| private

Definition at line 1484 of file archive_options.hpp.

## ◆ x_display_treated

bool libdar::archive_options_extract::x_display_treated
| private

Definition at line 1482 of file archive_options.hpp.

## ◆ x_display_treated_only_dir

bool libdar::archive_options_extract::x_display_treated_only_dir
| private

Definition at line 1483 of file archive_options.hpp.

## ◆ x_ea_mask

mask* libdar::archive_options_extract::x_ea_mask
| private

Definition at line 1485 of file archive_options.hpp.

## ◆ x_empty

bool libdar::archive_options_extract::x_empty
| private

Definition at line 1489 of file archive_options.hpp.

## ◆ x_empty_dir

bool libdar::archive_options_extract::x_empty_dir
| private

Definition at line 1490 of file archive_options.hpp.

## ◆ x_flat

bool libdar::archive_options_extract::x_flat
| private

Definition at line 1486 of file archive_options.hpp.

## ◆ x_ignore_deleted

bool libdar::archive_options_extract::x_ignore_deleted
| private

Definition at line 1494 of file archive_options.hpp.

## ◆ x_ignore_unix_sockets

bool libdar::archive_options_extract::x_ignore_unix_sockets
| private

Definition at line 1496 of file archive_options.hpp.

## ◆ x_in_place

bool libdar::archive_options_extract::x_in_place
| private

Definition at line 1497 of file archive_options.hpp.

## ◆ x_info_details

bool libdar::archive_options_extract::x_info_details
| private

Definition at line 1481 of file archive_options.hpp.

## ◆ x_only_deleted

bool libdar::archive_options_extract::x_only_deleted
| private

Definition at line 1493 of file archive_options.hpp.

## ◆ x_overwrite

crit_action* libdar::archive_options_extract::x_overwrite
| private

Definition at line 1492 of file archive_options.hpp.

## ◆ x_scope

fsa_scope libdar::archive_options_extract::x_scope
| private

Definition at line 1495 of file archive_options.hpp.

## ◆ x_selection

mask* libdar::archive_options_extract::x_selection
| private

Definition at line 1478 of file archive_options.hpp.

## ◆ x_subtree

mask* libdar::archive_options_extract::x_subtree
| private

Definition at line 1479 of file archive_options.hpp.

## ◆ x_warn_over

bool libdar::archive_options_extract::x_warn_over
| private

Definition at line 1480 of file archive_options.hpp.

## ◆ x_warn_remove_no_match

bool libdar::archive_options_extract::x_warn_remove_no_match
| private

Definition at line 1488 of file archive_options.hpp.

## ◆ x_what_to_check

comparison_fields libdar::archive_options_extract::x_what_to_check
| private

Definition at line 1487 of file archive_options.hpp.

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

- archive_options.hpp