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

Loading...
Searching...
No Matches
filtre.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2026 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef FILTRE_HPP
27#define FILTRE_HPP
28
29#include "../my_config.h"
30#include "mask.hpp"
31#include "pile.hpp"
32#include "catalogue.hpp"
33#include "path.hpp"
34#include "statistics.hpp"
35#include "archive_options.hpp"
36#include "thread_cancellation.hpp"
37#include "filesystem_ids.hpp"
38
39 namespace libdar
40{
41
44
45 extern void filtre_restore(const std::shared_ptr<user_interaction> & dialog,
46 const mask &filtre,
47 const mask & subtree,
48 const catalogue & cat,
49 const path & fs_racine,
50 bool fs_warn_overwrite,
51 bool info_details,
52 bool display_treated,
53 bool display_treated_only_dir,
54 bool display_skipped,
55 statistics & st,
56 const mask & ea_mask,
57 bool flat,
58 comparison_fields what_to_check,
59 bool warn_remove_no_match,
60 bool empty,
61 bool empty_dir,
62 const crit_action & x_overwrite,
63 archive_options_extract::t_dirty dirty,
64 bool only_deleted,
65 bool not_deleted,
66 const fsa_scope & scope,
67 bool ignore_unix_sockets
68 );
69
70 extern void filtre_sauvegarde(const std::shared_ptr<user_interaction> & dialog,
71 const mask &filtre,
72 const mask &subtree,
73 const pile_descriptor & pdesc,
74 catalogue & cat,
75 const catalogue & ref,
76 const path & fs_racine,
77 bool info_details,
78 bool display_treated,
79 bool display_treated_only_dir,
80 bool display_skipped,
81 bool display_finished,
82 statistics & st,
83 bool make_empty_dir,
84 const mask & ea_mask,
85 const mask &compr_mask,
86 const infinint & min_compr_size,
87 bool nodump,
88 const infinint & hourshift,
89 bool alter_time,
90 bool furtive_read_mode,
91 const filesystem_ids & same_fs,
92 comparison_fields what_to_check,
93 bool snapshot,
94 bool cache_directory_tagging,
95 bool security_check,
96 const infinint & repeat_count,
97 const infinint & repeat_byte,
98 const infinint & fixed_date,
99 const infinint & sparse_file_min_size,
100 const std::string & backup_hook_file_execute,
101 const mask & backup_hook_file_mask,
102 bool ignore_unknown,
103 const fsa_scope & scope,
104 const std::string & exclude_by_ea,
105 bool delta_signature, // whether to compute delta sig file on the saved file
106 const infinint & delta_sig_min_size, // size below which to never calculate delta sig
107 const mask & delta_mask, // mask defining for which file to calculate delta sig
108 bool delta_diff, // whether to perform delta diff backup when delta sig is present
109 bool auto_zeroing_neg_dates,
110 const std::set<std::string> & ignored_symlinks,
111 modified_data_detection mod_data_detect,
112 const delta_sig_block_size & delta_sig_block_len,
113 bool never_resave_uncompressed,
114 bool ref_read_in_seq_mode);
115
116 extern void filtre_difference(const std::shared_ptr<user_interaction> & dialog,
117 const mask &filtre,
118 const mask &subtree,
119 const catalogue & cat,
120 const path & fs_racine,
121 bool info_details,
122 bool display_treated,
123 bool display_treated_only_dir,
124 bool display_skipped,
125 statistics & st,
126 const mask & ea_mask,
127 bool alter_time,
128 bool furtive_read_mode,
129 comparison_fields what_to_check,
130 const infinint & hourshift,
131 bool compare_symlink_date,
132 const fsa_scope & scope,
133 bool isolated_mode,
134 bool seq_read_mode,
135 bool auto_zeroing_neg_dates);
136
137 extern void filtre_test(const std::shared_ptr<user_interaction> & dialog,
138 const mask &filtre,
139 const mask &subtree,
140 const catalogue & cat,
141 bool info_details,
142 bool display_treated,
143 bool display_treated_only_dir,
144 bool display_skipped,
145 bool empty,
146 bool repairing,
147 statistics & st);
148
149 extern void filtre_merge(const std::shared_ptr<user_interaction> & dialog,
150 const mask & filtre,
151 const mask & subtree,
152 const pile_descriptor & pdesc,
153 catalogue & cat,
154 const catalogue * ref1,
155 const catalogue * ref2,
156 bool info_details,
157 bool display_treated,
158 bool display_treated_only_dir,
159 bool display_skipped,
160 statistics & st,
161 bool make_empty_dir,
162 const mask & ea_mask,
163 const mask & compr_mask,
164 const infinint & min_compr_size,
165 bool keep_compressed,
166 const crit_action & overwrite,
167 bool warn_overwrite,
168 bool decremental_mode,
169 const infinint & sparse_file_min_size,
170 const fsa_scope & scope,
171 bool delta_signature,
172 bool build_delta_sig,
173 const infinint & delta_sig_min_size,
174 const mask & delta_mask,
175 const delta_sig_block_size & signature_block_size,
176 bool never_resave_uncompressed);
177
178
180
182 extern void filtre_merge_step0(const std::shared_ptr<user_interaction> & dialog,
183 const catalogue * ref1,
184 const catalogue * ref2,
185 statistics & st,
186 bool decremental_mode,
187 crit_action* & decr,
188 const crit_action* & overwrite,
189 bool & abort,
190 thread_cancellation & thr_cancel);
191
193
194 extern void filtre_merge_step1(const std::shared_ptr<user_interaction> & dialog,
195 const mask & filtre,
196 const mask & subtree,
197 catalogue & cat,
198 const catalogue * ref1,
199 const catalogue * ref2,
200 bool info_details,
201 bool display_treated,
202 bool display_skipped,
203 statistics & st,
204 bool make_empty_dir,
205 bool warn_overwrite,
206 bool decremental_mode,
207 crit_action* & decr,
208 const crit_action* & overwrite,
209 bool & abort,
210 thread_cancellation & thr_cancel);
211
212
214
216 extern void filtre_merge_step2(const std::shared_ptr<user_interaction> & dialog,
217 const pile_descriptor & pdesc,
218 catalogue & cat,
219 bool info_details,
220 bool display_treated,
221 bool display_treated_only_dir,
222 const mask & compr_mask,
223 const infinint & min_compr_size,
224 bool keep_compressed,
225 const infinint & sparse_file_min_size,
226 bool delta_signature,
227 bool build_delta_sig,
228 const infinint & delta_sig_min_size,
229 const mask & delta_mask,
230 bool & abort,
231 thread_cancellation & thr_cancel,
232 bool repair_mode,
233 const delta_sig_block_size & signature_block_size,
234 bool never_resave_uncompressed);
235
236
237 void filtre_sequentially_read_all_catalogue(catalogue & cat,
238 const std::shared_ptr<user_interaction> & dialog,
239 bool lax_read_mode);
240
241
242
244
245} // end of namespace
246
247#endif
archive_options.hpp
this file contains a set of classes used to transmit options to archive operation
catalogue.hpp
here is defined the classe used to manage catalogue of archives
libdar::catalogue
the catalogue class which gather all objects contained in a give archive
Definition catalogue.hpp:60
libdar::crit_action
the global action for overwriting
Definition crit_action.hpp:81
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::mask
the generic class, parent of all masks
Definition mask.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
libdar::statistics
class used by libdar::archive class to give a summary of treated file during and after an operation
Definition statistics.hpp:70
libdar::thread_cancellation
class to be used as parent to provide checkpoints to inherited classes
Definition thread_cancellation.hpp:69
filesystem_ids.hpp
gather the ids of different filesystem to provide a filter based on filesystem
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition archive_aux.hpp:44
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition archive_aux.hpp:53
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition fsa_family.hpp:70
libdar::filtre_merge_step0
void filtre_merge_step0(const std::shared_ptr< user_interaction > &dialog, const catalogue *ref1, const catalogue *ref2, statistics &st, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
initialize variables used for merging in step1 and step2
libdar::filtre_merge_step1
void filtre_merge_step1(const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, catalogue &cat, const catalogue *ref1, const catalogue *ref2, bool info_details, bool display_treated, bool display_skipped, statistics &st, bool make_empty_dir, bool warn_overwrite, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
builds a catalogue from two refs with the given policy and filters
libdar::filtre_restore
void filtre_restore(const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool fs_warn_overwrite, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool flat, comparison_fields what_to_check, bool warn_remove_no_match, bool empty, bool empty_dir, const crit_action &x_overwrite, archive_options_extract::t_dirty dirty, bool only_deleted, bool not_deleted, const fsa_scope &scope, bool ignore_unix_sockets)
libdar::filtre_merge_step2
void filtre_merge_step2(const std::shared_ptr< user_interaction > &dialog, const pile_descriptor &pdesc, catalogue &cat, bool info_details, bool display_treated, bool display_treated_only_dir, const mask &compr_mask, const infinint &min_compr_size, bool keep_compressed, const infinint &sparse_file_min_size, bool delta_signature, bool build_delta_sig, const infinint &delta_sig_min_size, const mask &delta_mask, bool &abort, thread_cancellation &thr_cancel, bool repair_mode, const delta_sig_block_size &signature_block_size, bool never_resave_uncompressed)
copies data of "cat" catalogue to the pdesc of a brand-new archive
mask.hpp
here lies a collection of mask classes
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
path.hpp
here is the definition of the path class
pile.hpp
class pile definition. Used to manage a stack of generic_file objects
statistics.hpp
class handling access to the data summary of treated files after and during each operation
libdar::delta_sig_block_size
defines how to calculate delta signature block size based of file size to delta sign
Definition delta_sig_block_size.hpp:50
thread_cancellation.hpp
to be able to cancel libdar operation while running in a given thread.