Disk ARchive  2.6.0
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-2018 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 
111  extern void filtre_difference(const std::shared_ptr<user_interaction> & dialog,
112  const mask &filtre,
113  const mask &subtree,
114  const catalogue & cat,
115  const path & fs_racine,
116  bool info_details,
117  bool display_treated,
118  bool display_treated_only_dir,
119  bool display_skipped,
120  statistics & st,
121  const mask & ea_mask,
122  bool alter_time,
123  bool furtive_read_mode,
124  comparison_fields what_to_check,
125  const infinint & hourshift,
126  bool compare_symlink_date,
127  const fsa_scope & scope,
128  bool isolated_mode);
129 
130  extern void filtre_test(const std::shared_ptr<user_interaction> & dialog,
131  const mask &filtre,
132  const mask &subtree,
133  const catalogue & cat,
134  bool info_details,
135  bool display_treated,
136  bool display_treated_only_dir,
137  bool display_skipped,
138  bool empty,
139  statistics & st);
140 
141  extern void filtre_merge(const std::shared_ptr<user_interaction> & dialog,
142  const mask & filtre,
143  const mask & subtree,
144  const pile_descriptor & pdesc,
145  catalogue & cat,
146  const catalogue * ref1,
147  const catalogue * ref2,
148  bool info_details,
149  bool display_treated,
150  bool display_treated_only_dir,
151  bool display_skipped,
152  statistics & st,
153  bool make_empty_dir,
154  const mask & ea_mask,
155  const mask & compr_mask,
156  const infinint & min_compr_size,
157  bool keep_compressed,
158  const crit_action & overwrite,
159  bool warn_overwrite,
160  bool decremental_mode,
161  const infinint & sparse_file_min_size,
162  const fsa_scope & scope,
163  bool delta_signature,
164  bool build_delta_sig,
165  const infinint & delta_sig_min_size,
166  const mask & delta_mask);
167 
168 
170 
172  extern void filtre_merge_step0(const std::shared_ptr<user_interaction> & dialog,
173  const catalogue * ref1,
174  const catalogue * ref2,
175  statistics & st,
176  bool decremental_mode,
177  crit_action* & decr,
178  const crit_action* & overwrite,
179  bool & abort,
180  thread_cancellation & thr_cancel);
181 
183 
184  extern void filtre_merge_step1(const std::shared_ptr<user_interaction> & dialog,
185  const mask & filtre,
186  const mask & subtree,
187  catalogue & cat,
188  const catalogue * ref1,
189  const catalogue * ref2,
190  bool info_details,
191  bool display_treated,
192  bool display_skipped,
193  statistics & st,
194  bool make_empty_dir,
195  bool warn_overwrite,
196  bool decremental_mode,
197  crit_action* & decr,
198  const crit_action* & overwrite,
199  bool & abort,
200  thread_cancellation & thr_cancel);
201 
202 
204 
206  extern void filtre_merge_step2(const std::shared_ptr<user_interaction> & dialog,
207  const pile_descriptor & pdesc,
208  catalogue & cat,
209  bool info_details,
210  bool display_treated,
211  bool display_treated_only_dir,
212  const mask & compr_mask,
213  const infinint & min_compr_size,
214  bool keep_compressed,
215  const infinint & sparse_file_min_size,
216  bool delta_signature,
217  bool build_delta_sig,
218  const infinint & delta_sig_min_size,
219  const mask & delta_mask,
220  bool & abort,
221  thread_cancellation & thr_cancel,
222  bool repair_mode);
223 
224 
225  void filtre_sequentially_read_all_catalogue(catalogue & cat,
226  const std::shared_ptr<user_interaction> & dialog,
227  bool lax_read_mode);
228 
229 
230 
232 
233 } // end of namespace
234 
235 #endif
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:52
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
class pile definition. Used to manage a stack of generic_file objects
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)
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
here is the definition of the path classthe path class handle path and provide several operation on t...
class handling access to the data summary of treated files after and during each operation ...
to be able to cancel libdar operation while running in a given thread.
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)
copies data of "cat" catalogue to the pdesc of a brand new archive
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
here lies a collection of mask classes
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:43
this file contains a set of classes used to transmit options to archive operation ...
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46
here is defined the classe used to manage catalogue of archives
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time