Disk ARchive  2.6.8
Full featured and portable backup and archiving tool
filtre.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2020 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 : http://dar.linux.free.fr/email.html
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 
38 namespace libdar
39 {
40 
43 
44  extern void filtre_restore(const std::shared_ptr<user_interaction> & dialog,
45  const mask &filtre,
46  const mask & subtree,
47  const catalogue & cat,
48  const path & fs_racine,
49  bool fs_warn_overwrite,
50  bool info_details,
51  bool display_treated,
52  bool display_treated_only_dir,
53  bool display_skipped,
54  statistics & st,
55  const mask & ea_mask,
56  bool flat,
57  comparison_fields what_to_check,
58  bool warn_remove_no_match,
59  bool empty,
60  bool empty_dir,
61  const crit_action & x_overwrite,
62  archive_options_extract::t_dirty dirty,
63  bool only_deleted,
64  bool not_deleted,
65  const fsa_scope & scope
66  );
67 
68  extern void filtre_sauvegarde(const std::shared_ptr<user_interaction> & dialog,
69  const mask &filtre,
70  const mask &subtree,
71  const pile_descriptor & pdesc,
72  catalogue & cat,
73  const catalogue & ref,
74  const path & fs_racine,
75  bool info_details,
76  bool display_treated,
77  bool display_treated_only_dir,
78  bool display_skipped,
79  bool display_finished,
80  statistics & st,
81  bool make_empty_dir,
82  const mask & ea_mask,
83  const mask &compr_mask,
84  const infinint & min_compr_size,
85  bool nodump,
86  const infinint & hourshift,
87  bool alter_time,
88  bool furtive_read_mode,
89  bool same_fs,
90  comparison_fields what_to_check,
91  bool snapshot,
92  bool cache_directory_tagging,
93  bool security_check,
94  const infinint & repeat_count,
95  const infinint & repeat_byte,
96  const infinint & fixed_date,
97  const infinint & sparse_file_min_size,
98  const std::string & backup_hook_file_execute,
99  const mask & backup_hook_file_mask,
100  bool ignore_unknown,
101  const fsa_scope & scope,
102  const std::string & exclude_by_ea,
103  bool delta_signature, // whether to compute delta sig file on the saved file
104  const infinint & delta_sig_min_size, // size below which to never calculate delta sig
105  const mask & delta_mask, // mask defining for which file to calculate delta sig
106  bool delta_diff, // whether to perform delta diff backup when delta sig is present
107  bool auto_zeroing_neg_dates,
108  const std::set<std::string> & ignored_symlinks,
109  modified_data_detection mod_data_detect,
110  const delta_sig_block_size & delta_sig_block_len);
111 
112  extern void filtre_difference(const std::shared_ptr<user_interaction> & dialog,
113  const mask &filtre,
114  const mask &subtree,
115  const catalogue & cat,
116  const path & fs_racine,
117  bool info_details,
118  bool display_treated,
119  bool display_treated_only_dir,
120  bool display_skipped,
121  statistics & st,
122  const mask & ea_mask,
123  bool alter_time,
124  bool furtive_read_mode,
125  comparison_fields what_to_check,
126  const infinint & hourshift,
127  bool compare_symlink_date,
128  const fsa_scope & scope,
129  bool isolated_mode);
130 
131  extern void filtre_test(const std::shared_ptr<user_interaction> & dialog,
132  const mask &filtre,
133  const mask &subtree,
134  const catalogue & cat,
135  bool info_details,
136  bool display_treated,
137  bool display_treated_only_dir,
138  bool display_skipped,
139  bool empty,
140  statistics & st);
141 
142  extern void filtre_merge(const std::shared_ptr<user_interaction> & dialog,
143  const mask & filtre,
144  const mask & subtree,
145  const pile_descriptor & pdesc,
146  catalogue & cat,
147  const catalogue * ref1,
148  const catalogue * ref2,
149  bool info_details,
150  bool display_treated,
151  bool display_treated_only_dir,
152  bool display_skipped,
153  statistics & st,
154  bool make_empty_dir,
155  const mask & ea_mask,
156  const mask & compr_mask,
157  const infinint & min_compr_size,
158  bool keep_compressed,
159  const crit_action & overwrite,
160  bool warn_overwrite,
161  bool decremental_mode,
162  const infinint & sparse_file_min_size,
163  const fsa_scope & scope,
164  bool delta_signature,
165  bool build_delta_sig,
166  const infinint & delta_sig_min_size,
167  const mask & delta_mask,
168  const delta_sig_block_size & signature_block_size);
169 
170 
172 
174  extern void filtre_merge_step0(const std::shared_ptr<user_interaction> & dialog,
175  const catalogue * ref1,
176  const catalogue * ref2,
177  statistics & st,
178  bool decremental_mode,
179  crit_action* & decr,
180  const crit_action* & overwrite,
181  bool & abort,
182  thread_cancellation & thr_cancel);
183 
185 
186  extern void filtre_merge_step1(const std::shared_ptr<user_interaction> & dialog,
187  const mask & filtre,
188  const mask & subtree,
189  catalogue & cat,
190  const catalogue * ref1,
191  const catalogue * ref2,
192  bool info_details,
193  bool display_treated,
194  bool display_skipped,
195  statistics & st,
196  bool make_empty_dir,
197  bool warn_overwrite,
198  bool decremental_mode,
199  crit_action* & decr,
200  const crit_action* & overwrite,
201  bool & abort,
202  thread_cancellation & thr_cancel);
203 
204 
206 
208  extern void filtre_merge_step2(const std::shared_ptr<user_interaction> & dialog,
209  const pile_descriptor & pdesc,
210  catalogue & cat,
211  bool info_details,
212  bool display_treated,
213  bool display_treated_only_dir,
214  const mask & compr_mask,
215  const infinint & min_compr_size,
216  bool keep_compressed,
217  const infinint & sparse_file_min_size,
218  bool delta_signature,
219  bool build_delta_sig,
220  const infinint & delta_sig_min_size,
221  const mask & delta_mask,
222  bool & abort,
223  thread_cancellation & thr_cancel,
224  bool repair_mode,
225  const delta_sig_block_size & signature_block_size);
226 
227 
228  void filtre_sequentially_read_all_catalogue(catalogue & cat,
229  const std::shared_ptr<user_interaction> & dialog,
230  bool lax_read_mode);
231 
232 
233 
235 
236 } // end of namespace
237 
238 #endif
mask.hpp
here lies a collection of mask classes
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::compile_time::nodump
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time
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_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)
thread_cancellation.hpp
to be able to cancel libdar operation while running in a given thread.
archive_options.hpp
this file contains a set of classes used to transmit options to archive operation
statistics.hpp
class handling access to the data summary of treated files after and during each operation
pile.hpp
class pile definition. Used to manage a stack of generic_file objects
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:52
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)
copies data of "cat" catalogue to the pdesc of a brand new archive
catalogue.hpp
here is defined the classe used to manage catalogue of archives
path.hpp
here is the definition of the path class
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:43
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46