26 #ifndef ARCHIVE_OPTIONS_HPP
27 #define ARCHIVE_OPTIONS_HPP
29 #include "../my_config.h"
112 void set_input_pipe(
const std::string & input_pipe) { x_input_pipe = input_pipe; };
118 void set_output_pipe(
const std::string & output_pipe) { x_output_pipe = output_pipe; };
131 void set_execute(
const std::string & execute) { x_execute = execute; };
155 void set_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_read::set_entrepot",
"null entrepot pointer given in argument"); x_entrepot = entr; };
176 void set_external_catalogue(
const path & ref_chem,
const std::string & ref_basename) { x_ref_chem = ref_chem, x_ref_basename = ref_basename; external_cat =
true; };
200 void set_ref_execute(
const std::string & ref_execute) { x_ref_execute = ref_execute; };
208 void set_ref_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_read::set_ref_entrepot",
"null entrepot pointer given in argument"); x_ref_entrepot = entr; };
219 crypto_algo get_crypto_algo()
const {
return x_crypto; };
220 const secu_string & get_crypto_pass()
const {
return x_pass; };
221 U_32 get_crypto_size()
const {
return x_crypto_size; };
222 const std::string & get_input_pipe()
const {
return x_input_pipe; };
223 const std::string & get_output_pipe()
const {
return x_output_pipe; };
224 const std::string & get_execute()
const {
return x_execute; };
225 bool get_info_details()
const {
return x_info_details; };
226 bool get_lax()
const {
return x_lax; };
227 bool get_sequential_read()
const {
return x_sequential_read; };
228 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
229 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
230 bool get_ignore_signature_check_failure()
const {
return x_ignore_signature_check_failure; };
231 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
232 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
235 bool is_external_catalogue_set()
const {
return external_cat; };
236 const path & get_ref_path()
const;
237 const std::string & get_ref_basename()
const;
238 crypto_algo get_ref_crypto_algo()
const {
return x_ref_crypto; };
239 const secu_string & get_ref_crypto_pass()
const {
return x_ref_pass; };
240 U_32 get_ref_crypto_size()
const {
return x_ref_crypto_size; };
241 const std::string & get_ref_execute()
const {
return x_ref_execute; };
242 infinint get_ref_slice_min_digits()
const {
return x_ref_slice_min_digits; };
243 const std::shared_ptr<entrepot> & get_ref_entrepot()
const {
return x_ref_entrepot; };
244 bool get_header_only()
const {
return x_header_only; };
251 std::string x_input_pipe;
252 std::string x_output_pipe;
253 std::string x_execute;
256 bool x_sequential_read;
257 infinint x_slice_min_digits;
258 std::shared_ptr<entrepot> x_entrepot;
259 bool x_ignore_signature_check_failure;
260 U_I x_multi_threaded_crypto;
261 U_I x_multi_threaded_compress;
267 std::string x_ref_basename;
269 secu_string x_ref_pass;
270 U_32 x_ref_crypto_size;
271 std::string x_ref_execute;
272 infinint x_ref_slice_min_digits;
273 std::shared_ptr<entrepot> x_ref_entrepot;
345 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
384 x_file_size = file_size;
385 if(first_file_size.is_zero())
386 x_first_file_size = file_size;
388 x_first_file_size = first_file_size;
406 void set_execute(
const std::string & execute) { x_execute = execute; };
427 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
433 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
447 { exclude_by_ea = (ea_name ==
"" ?
"user.libdar_no_backup" : ea_name); };
467 x_alter_atime = alter_atime;
477 void set_same_fs(
bool same_fs) { x_same_fs = same_fs; x_same_fs_include.clear(); x_same_fs_exclude.clear(); };
482 void set_same_fs_include(
const std::string & included_path_to_fs) { x_same_fs_include.push_back(included_path_to_fs); };
487 void set_same_fs_exclude(
const std::string & excluded_path_to_fs) { x_same_fs_exclude.push_back(excluded_path_to_fs); };
508 void set_retry_on_change(
const infinint & count_max_per_file,
const infinint & global_max_byte_overhead = 0) { x_repeat_count = count_max_per_file; x_repeat_byte = global_max_byte_overhead; };
538 void set_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_create::set_entrepot",
"null entrepot pointer given in argument"); x_entrepot = entr; };
597 std::shared_ptr<archive> get_reference()
const {
return x_ref_arch; };
599 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
600 bool get_allow_over()
const {
return x_allow_over; };
601 bool get_warn_over()
const {
return x_warn_over; };
602 bool get_info_details()
const {
return x_info_details; };
603 bool get_display_treated()
const {
return x_display_treated; };
604 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
605 bool get_display_skipped()
const {
return x_display_skipped; };
606 bool get_display_finished()
const {
return x_display_finished; };
607 const infinint & get_pause()
const {
return x_pause; };
608 bool get_empty_dir()
const {
return x_empty_dir; };
609 compression get_compression()
const {
return x_compr_algo; };
610 U_I get_compression_level()
const {
return x_compression_level; };
611 U_I get_compression_block_size()
const {
return x_compression_block_size; };
612 const infinint & get_slice_size()
const {
return x_file_size; };
613 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
614 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
615 const std::string & get_execute()
const {
return x_execute; };
616 crypto_algo get_crypto_algo()
const {
return x_crypto; };
617 const secu_string & get_crypto_pass()
const {
return x_pass; };
618 U_32 get_crypto_size()
const {
return x_crypto_size; };
619 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
620 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
622 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
623 bool get_nodump()
const {
return x_nodump; };
624 const std::string & get_exclude_by_ea()
const {
return exclude_by_ea; };
626 const infinint & get_hourshift()
const {
return x_hourshift; };
627 bool get_empty()
const {
return x_empty; };
628 bool get_alter_atime()
const {
return x_alter_atime; };
629 bool get_furtive_read_mode()
const {
return x_furtive_read; };
630 bool get_same_fs()
const {
return x_same_fs; };
631 std::deque<std::string> get_same_fs_include()
const {
return x_same_fs_include; };
632 std::deque<std::string> get_same_fs_exclude()
const {
return x_same_fs_exclude; };
633 bool get_snapshot()
const {
return x_snapshot; };
634 bool get_cache_directory_tagging()
const {
return x_cache_directory_tagging; };
635 const infinint & get_fixed_date()
const {
return x_fixed_date; };
636 const std::string & get_slice_permission()
const {
return x_slice_permission; };
637 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
638 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
639 const infinint & get_repeat_count()
const {
return x_repeat_count; };
640 const infinint & get_repeat_byte()
const {
return x_repeat_byte; };
641 bool get_sequential_marks()
const {
return x_sequential_marks; };
642 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
643 bool get_security_check()
const {
return x_security_check; };
644 const std::string & get_user_comment()
const {
return x_user_comment; };
645 hash_algo get_hash_algo()
const {
return x_hash; };
646 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
647 const std::string & get_backup_hook_file_execute()
const {
return x_backup_hook_file_execute; };
648 const mask & get_backup_hook_file_mask()
const {
return *x_backup_hook_file_mask; };
649 bool get_ignore_unknown_inode_type()
const {
return x_ignore_unknown; };
650 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
651 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
652 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
653 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
654 bool get_delta_diff()
const {
return x_delta_diff; };
655 bool get_delta_signature()
const {
return x_delta_signature; };
656 const mask & get_delta_mask()
const {
return *x_delta_mask; }
657 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
658 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
659 bool get_auto_zeroing_neg_dates()
const {
return x_auto_zeroing_neg_dates; };
660 const std::set<std::string> & get_ignored_as_symlink()
const {
return x_ignored_as_symlink; };
662 const infinint & get_iteration_count()
const {
return x_iteration_count; };
663 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
664 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
673 bool x_display_treated;
674 bool x_display_treated_only_dir;
675 bool x_display_skipped;
676 bool x_display_finished;
680 U_I x_compression_level;
681 U_I x_compression_block_size;
685 std::string x_execute;
689 std::vector<std::string> x_gnupg_recipients;
690 std::vector<std::string> x_gnupg_signatories;
694 std::string exclude_by_ea;
702 std::deque<std::string> x_same_fs_include;
703 std::deque<std::string> x_same_fs_exclude;
705 bool x_cache_directory_tagging;
707 std::string x_slice_permission;
708 std::string x_slice_user_ownership;
709 std::string x_slice_group_ownership;
712 bool x_sequential_marks;
714 bool x_security_check;
715 std::string x_user_comment;
718 mask * x_backup_hook_file_mask;
719 std::string x_backup_hook_file_execute;
720 bool x_ignore_unknown;
721 std::shared_ptr<entrepot> x_entrepot;
723 U_I x_multi_threaded_crypto;
724 U_I x_multi_threaded_compress;
726 bool x_delta_signature;
728 bool has_delta_mask_been_set;
730 bool x_auto_zeroing_neg_dates;
731 std::set<std::string> x_ignored_as_symlink;
737 void nullifyptr() noexcept;
738 void destroy() noexcept;
741 void destroy_mask(
mask * & ptr);
742 void clean_mask(
mask * & ptr);
743 void check_mask(const
mask & m);
802 x_file_size = file_size;
803 if(first_file_size.is_zero())
804 x_first_file_size = file_size;
806 x_first_file_size = first_file_size;
820 void set_execute(
const std::string & execute) { x_execute = execute; };
835 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
840 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
867 void set_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_isolated::set_entrepot",
"null entrepot pointer given in argument"); x_entrepot = entr; };
905 bool get_allow_over()
const {
return x_allow_over; };
906 bool get_warn_over()
const {
return x_warn_over; };
907 bool get_info_details()
const {
return x_info_details; };
908 const infinint & get_pause()
const {
return x_pause; };
909 compression get_compression()
const {
return x_algo; };
910 U_I get_compression_level()
const {
return x_compression_level; };
911 U_I get_compression_block_size()
const {
return x_compression_block_size; };
912 const infinint & get_slice_size()
const {
return x_file_size; };
913 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
914 const std::string & get_execute()
const {
return x_execute; };
915 crypto_algo get_crypto_algo()
const {
return x_crypto; };
916 const secu_string & get_crypto_pass()
const {
return x_pass; };
917 U_32 get_crypto_size()
const {
return x_crypto_size; };
918 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
919 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
920 bool get_empty()
const {
return x_empty; };
921 const std::string & get_slice_permission()
const {
return x_slice_permission; };
922 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
923 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
924 const std::string & get_user_comment()
const {
return x_user_comment; };
925 hash_algo get_hash_algo()
const {
return x_hash; };
926 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
927 bool get_sequential_marks()
const {
return x_sequential_marks; };
928 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
929 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
930 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
931 bool get_delta_signature()
const {
return x_delta_signature; };
932 const mask & get_delta_mask()
const {
return *x_delta_mask; }
933 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
934 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
935 const infinint & get_iteration_count()
const {
return x_iteration_count; };
936 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
937 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
946 U_I x_compression_level;
947 U_I x_compression_block_size;
948 infinint x_file_size;
949 infinint x_first_file_size;
950 std::string x_execute;
954 std::vector<std::string> x_gnupg_recipients;
955 std::vector<std::string> x_gnupg_signatories;
957 std::string x_slice_permission;
958 std::string x_slice_user_ownership;
959 std::string x_slice_group_ownership;
960 std::string x_user_comment;
962 infinint x_slice_min_digits;
963 bool x_sequential_marks;
964 std::shared_ptr<entrepot> x_entrepot;
965 U_I x_multi_threaded_crypto;
966 U_I x_multi_threaded_compress;
967 bool x_delta_signature;
969 bool has_delta_mask_been_set;
970 infinint x_delta_sig_min_size;
971 infinint x_iteration_count;
973 delta_sig_block_size x_sig_block_len;
975 void copy_from(
const archive_options_isolate & ref);
976 void move_from(archive_options_isolate && ref) noexcept;
977 void destroy() noexcept;
978 void nullifyptr() noexcept;
1004 void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
1043 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1070 x_file_size = file_size;
1071 if(first_file_size.is_zero())
1072 x_first_file_size = file_size;
1074 x_first_file_size = first_file_size;
1091 void set_execute(
const std::string & execute) { x_execute = execute; };
1107 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1112 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1154 void set_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_merge::set_entrepot",
"null entrepot pointer given in argument"); x_entrepot = entr; };
1199 std::shared_ptr<archive> get_auxiliary_ref()
const {
return x_ref; };
1201 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1202 bool get_allow_over()
const {
return x_allow_over; };
1203 bool get_warn_over()
const {
return x_warn_over; };
1204 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
1205 bool get_info_details()
const {
return x_info_details; };
1206 bool get_display_treated()
const {
return x_display_treated; };
1207 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1208 bool get_display_skipped()
const {
return x_display_skipped; };
1209 const infinint & get_pause()
const {
return x_pause; };
1210 bool get_empty_dir()
const {
return x_empty_dir; };
1211 compression get_compression()
const {
return x_compr_algo; };
1212 U_I get_compression_level()
const {
return x_compression_level; };
1213 U_I get_compression_block_size()
const {
return x_compression_block_size; };
1214 const infinint & get_slice_size()
const {
return x_file_size; };
1215 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
1216 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1217 const std::string & get_execute()
const {
return x_execute; };
1218 crypto_algo get_crypto_algo()
const {
return x_crypto; };
1219 const secu_string & get_crypto_pass()
const {
return x_pass; };
1220 U_32 get_crypto_size()
const {
return x_crypto_size; };
1221 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
1222 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
1224 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
1225 bool get_empty()
const {
return x_empty; };
1226 bool get_keep_compressed()
const {
return x_keep_compressed; };
1227 const std::string & get_slice_permission()
const {
return x_slice_permission; };
1228 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
1229 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
1230 bool get_decremental_mode()
const {
return x_decremental; };
1231 bool get_sequential_marks()
const {
return x_sequential_marks; };
1232 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
1233 const std::string & get_user_comment()
const {
return x_user_comment; };
1234 hash_algo get_hash_algo()
const {
return x_hash; };
1235 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
1236 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
1237 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1238 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
1239 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
1240 bool get_delta_signature()
const {
return x_delta_signature; };
1241 const mask & get_delta_mask()
const {
return *x_delta_mask; }
1242 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
1243 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
1244 const infinint & get_iteration_count()
const {
return x_iteration_count; };
1245 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
1246 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
1250 std::shared_ptr<archive> x_ref;
1255 crit_action * x_overwrite;
1256 bool x_info_details;
1257 bool x_display_treated;
1258 bool x_display_treated_only_dir;
1259 bool x_display_skipped;
1263 U_I x_compression_level;
1264 U_I x_compression_block_size;
1265 infinint x_file_size;
1266 infinint x_first_file_size;
1268 std::string x_execute;
1272 std::vector<std::string> x_gnupg_recipients;
1273 std::vector<std::string> x_gnupg_signatories;
1275 infinint x_min_compr_size;
1277 bool x_keep_compressed;
1278 std::string x_slice_permission;
1279 std::string x_slice_user_ownership;
1280 std::string x_slice_group_ownership;
1282 bool x_sequential_marks;
1283 infinint x_sparse_file_min_size;
1284 std::string x_user_comment;
1286 infinint x_slice_min_digits;
1287 std::shared_ptr<entrepot> x_entrepot;
1289 U_I x_multi_threaded_crypto;
1290 U_I x_multi_threaded_compress;
1291 bool x_delta_signature;
1293 bool has_delta_mask_been_set;
1294 infinint x_delta_sig_min_size;
1295 infinint x_iteration_count;
1297 delta_sig_block_size x_sig_block_len;
1299 void destroy() noexcept;
1300 void copy_from(const archive_options_merge & ref);
1301 void move_from(archive_options_merge && ref) noexcept;
1302 void nullifyptr() noexcept;
1314 enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1358 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1385 void set_dirty_behavior(
bool ignore,
bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1418 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1419 bool get_warn_over()
const {
return x_warn_over; };
1420 bool get_info_details()
const {
return x_info_details; };
1421 bool get_display_treated()
const {
return x_display_treated; };
1422 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1423 bool get_display_skipped()
const {
return x_display_skipped; };
1424 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1425 bool get_flat()
const {
return x_flat; };
1427 bool get_warn_remove_no_match()
const {
return x_warn_remove_no_match; };
1428 bool get_empty()
const {
return x_empty; };
1429 bool get_empty_dir()
const {
return x_empty_dir; };
1430 t_dirty get_dirty_behavior()
const {
return x_dirty; }
1431 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
1432 bool get_only_deleted()
const {
return x_only_deleted; };
1433 bool get_ignore_deleted()
const {
return x_ignore_deleted; };
1434 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1435 bool get_ignore_unix_sockets()
const {
return x_ignore_unix_sockets; };
1436 bool get_in_place()
const {
return x_in_place; };
1442 bool x_info_details;
1443 bool x_display_treated;
1444 bool x_display_treated_only_dir;
1445 bool x_display_skipped;
1449 bool x_warn_remove_no_match;
1453 crit_action *x_overwrite;
1454 bool x_only_deleted;
1455 bool x_ignore_deleted;
1457 bool x_ignore_unix_sockets;
1460 void destroy() noexcept;
1461 void nullifyptr() noexcept;
1462 void copy_from(const archive_options_extract & ref);
1463 void move_from(archive_options_extract && ref) noexcept;
1484 virtual void clear();
1533 bool get_info_details()
const {
return x_info_details; };
1534 const mask & get_selection()
const;
1535 const mask & get_subtree()
const;
1536 bool get_filter_unsaved()
const {
return x_filter_unsaved; };
1537 bool get_user_slicing(infinint & slicing_first, infinint & slicing_others)
const;
1538 bool get_slicing_location()
const {
return x_slicing_location; };
1539 bool get_display_ea()
const {
return x_display_ea; };
1542 bool x_info_details;
1545 bool x_filter_unsaved;
1546 infinint *x_slicing_first;
1547 infinint *x_slicing_others;
1548 bool x_slicing_location;
1551 void destroy() noexcept;
1552 void nullifyptr() noexcept;
1553 void copy_from(const archive_options_listing & ref);
1554 void move_from(archive_options_listing && ref) noexcept;
1562 class archive_options_diff
1565 archive_options_diff() { nullifyptr();
clear(); };
1566 archive_options_diff(
const archive_options_diff & ref) { copy_from(ref); };
1567 archive_options_diff(archive_options_diff && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1568 archive_options_diff & operator = (
const archive_options_diff & ref) { destroy(); copy_from(ref);
return *
this; };
1569 archive_options_diff & operator = (archive_options_diff && ref) noexcept { move_from(std::move(ref));
return *
this; };
1570 ~archive_options_diff() { destroy(); };
1599 void set_info_details(
bool info_details) { x_info_details = info_details; };
1604 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1624 x_alter_atime = alter_atime;
1631 void set_hourshift(
const infinint & hourshift) { x_hourshift = hourshift; };
1634 void set_compare_symlink_date(
bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1640 void set_in_place(
bool arg) { x_in_place = arg; };
1647 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1648 bool get_info_details()
const {
return x_info_details; };
1649 bool get_display_treated()
const {
return x_display_treated; };
1650 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1651 bool get_display_skipped()
const {
return x_display_skipped; };
1652 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1654 bool get_alter_atime()
const {
return x_alter_atime; };
1655 bool get_furtive_read_mode()
const {
return x_furtive_read; };
1656 const infinint & get_hourshift()
const {
return x_hourshift; };
1657 bool get_compare_symlink_date()
const {
return x_compare_symlink_date; };
1658 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1659 bool get_in_place()
const {
return x_in_place; };
1664 bool x_info_details;
1665 bool x_display_treated;
1666 bool x_display_treated_only_dir;
1667 bool x_display_skipped;
1672 bool x_furtive_read;
1673 infinint x_hourshift;
1674 bool x_compare_symlink_date;
1678 void destroy() noexcept;
1679 void nullifyptr() noexcept;
1680 void copy_from(const archive_options_diff & ref);
1681 void move_from(archive_options_diff && ref) noexcept;
1737 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1747 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1748 bool get_info_details()
const {
return x_info_details; };
1749 bool get_display_treated()
const {
return x_display_treated; };
1750 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1751 bool get_display_skipped()
const {
return x_display_skipped; };
1752 bool get_empty()
const {
return x_empty; };
1757 bool x_info_details;
1758 bool x_display_treated;
1759 bool x_display_treated_only_dir;
1760 bool x_display_skipped;
1763 void destroy() noexcept;
1764 void nullifyptr() noexcept;
1765 void copy_from(const archive_options_test & ref);
1766 void move_from(archive_options_test && ref) noexcept;
1816 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1834 x_file_size = file_size;
1835 if(first_file_size.is_zero())
1836 x_first_file_size = file_size;
1838 x_first_file_size = first_file_size;
1852 void set_execute(
const std::string & execute) { x_execute = execute; };
1872 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1877 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1903 void set_entrepot(
const std::shared_ptr<entrepot> & entr) {
if(!entr)
throw Erange(
"archive_options_repair::set_entrepot",
"null entrepot pointer given in argument"); x_entrepot = entr; };
1921 bool get_allow_over()
const {
return x_allow_over; };
1922 bool get_warn_over()
const {
return x_warn_over; };
1923 bool get_info_details()
const {
return x_info_details; };
1924 bool get_display_treated()
const {
return x_display_treated; };
1925 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1926 bool get_display_skipped()
const {
return x_display_skipped; };
1927 bool get_display_finished()
const {
return x_display_finished; };
1928 const infinint & get_pause()
const {
return x_pause; };
1929 const infinint & get_slice_size()
const {
return x_file_size; };
1930 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
1931 const std::string & get_execute()
const {
return x_execute; };
1932 crypto_algo get_crypto_algo()
const {
return x_crypto; };
1933 const secu_string & get_crypto_pass()
const {
return x_pass; };
1934 U_32 get_crypto_size()
const {
return x_crypto_size; };
1935 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
1936 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
1937 bool get_empty()
const {
return x_empty; };
1938 const std::string & get_slice_permission()
const {
return x_slice_permission; };
1939 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
1940 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
1941 const std::string & get_user_comment()
const {
return x_user_comment; };
1942 hash_algo get_hash_algo()
const {
return x_hash; };
1943 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
1944 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
1945 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
1946 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
1951 bool x_info_details;
1952 bool x_display_treated;
1953 bool x_display_treated_only_dir;
1954 bool x_display_skipped;
1955 bool x_display_finished;
1957 infinint x_file_size;
1958 infinint x_first_file_size;
1959 std::string x_execute;
1963 std::vector<std::string> x_gnupg_recipients;
1964 std::vector<std::string> x_gnupg_signatories;
1966 std::string x_slice_permission;
1967 std::string x_slice_user_ownership;
1968 std::string x_slice_group_ownership;
1969 std::string x_user_comment;
1971 infinint x_slice_min_digits;
1972 std::shared_ptr<entrepot> x_entrepot;
1973 U_I x_multi_threaded_crypto;
1974 U_I x_multi_threaded_compress;
1976 void nullifyptr() noexcept {};
1977 void copy_from(
const archive_options_repair & ref);
1978 void move_from(archive_options_repair && ref) noexcept;
set of datastructures used to interact with a catalogue object
exception used when a requested fearture has not beed activated at compilation time
exception used to signal range error
class holding optional parameters used to create an archive
void clear()
reset all the options to their default values
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
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 argu...
void set_crypto_pass(const secu_string &pass)
void set_compression_block_size(U_I compression_block_size)
set the compression block size
void set_auto_zeroing_neg_dates(bool val)
whether to automatically zeroing negative dates read from the filesystem (just warn,...
void set_same_fs_include(const std::string &included_path_to_fs)
files on the filesystem pointed to by the given path will be considered for the backup operation if n...
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
void set_backup_hook(const std::string &execute, const mask &which_files)
defines the backup hook for files
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
void set_retry_on_change(const infinint &count_max_per_file, const infinint &global_max_byte_overhead=0)
how much time to retry saving a file if it changed while being read
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_security_check(bool check)
whether to check for ctime changes since with the archive of reference
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_fixed_date(const infinint &fixed_date)
whether to ignore any archive of reference and only save file which modification is more recent that ...
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
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_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
void set_subtree(const mask &subtree)
defines the directories and files to consider
void set_modified_data_detection(modified_data_detection val)
defines when to resave a file's data which inode metadata changed
void set_furtive_read_mode(bool furtive_read)
whether to use furtive read mode (if activated, alter_atime() has no meaning/use)
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
std::shared_ptr< archive > x_ref_arch
just contains the address of an existing object, no local copy of object is done here
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
void set_cache_directory_tagging(bool cache_directory_tagging)
whether to consider the Cache Directory Tagging Standard
void set_compr_mask(const mask &compr_mask)
defines files to compress
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 sli...
mask * x_ea_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
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...
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_same_fs(bool same_fs)
whether to limit the backup to files located on the same filesystem as the directory taken as root of...
void set_iteration_count(const infinint &val)
key derivation
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
mask * x_subtree
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
void set_delta_diff(bool val)
whether binary delta has to be computed for differential/incremental backup
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_hourshift(const infinint &hourshift)
ignore differences of at most this integer number of hours while looking for changes in dates
mask * x_selection
points to a local copy of mask (must be allocated / releases by the archive_option_create object)
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
void set_nodump(bool nodump)
defines whether to ignore files with the nodump flag set
void set_same_fs_exclude(const std::string &excluded_path_to_fs)
files on the filesystem pointed to by the given path will not be considered for backup operation
void set_ignored_as_symlink(const std::set< std::string > &list)
provide a list of full path which if are symlinks will be considered as the inode they point to
void set_exclude_by_ea(const std::string &ea_name)
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
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_compression(compression compr_algo)
set the compression algorithm to be used
mask * x_compr_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
void set_ignore_unknown_inode_type(bool val)
whether to ignore unknown inode types instead of issuing a warning
void set_snapshot(bool snapshot)
whether to make an emtpy archive only referencing the current state of files in the filesystem
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_reference(std::shared_ptr< archive > ref_arch)
set the archive to take as reference (nullptr for a full backup)
void set_alter_atime(bool alter_atime)
whether to alter atime or ctime in the filesystem when reading files to save
bool x_old_alter_atime
used to backup origina alter_atime value when activating furtive read mode
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
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_what_to_check(comparison_fields what_to_check)
set the fields to consider when comparing inodes with reference archive (see comparison_fields enumer...
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
void set_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
set the list of recipients that will be able to read the archive
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
void set_empty(bool empty)
whether to make a dry-run operation
class holding optional parameters used to isolate an existing archive
void set_crypto_size(U_32 crypto_size)
size of the encryption by block to use
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
void set_warn_over(bool warn_over)
whether a warning shall be issued before overwriting
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
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_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
void set_pause(const infinint &pause)
Pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each slice,...
void set_crypto_algo(crypto_algo crypto)
cypher to use
void set_allow_over(bool allow_over)
whether overwritting is allowed
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_compression_level(U_I compression_level)
the compression level (from 1 to 9)
void set_delta_sig_min_size(const infinint &val)
void set_multi_threaded(bool val)
whether libdar is allowed to created several thread to work possibily faster on multicore CPU (requir...
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_execute(const std::string &execute)
command to execute after each slice creation
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_compression(compression algo)
the compression algorithm used
void set_compression_block_size(U_I compression_block_size)
set the compression block size
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_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
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...
void set_info_details(bool info_details)
whether the user needs detailed output of the operation
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_iteration_count(const infinint &val)
key derivation
void set_crypto_pass(const secu_string &pass)
password / passphrase to encrypt the data with (empty string for interactive question)
void set_empty(bool empty)
whether to make a dry-run operation
class holding optional parameters used to list the contents of an existing archive
void set_subtree(const mask &subtree)
defines the directories and files to consider
void set_display_ea(bool display_ea)
whether to fetch EA for listing
void set_user_slicing(const infinint &slicing_first, const infinint &slicing_others)
when slice location is performed, user may modify the slice layout of the archive
void set_filter_unsaved(bool filter_unsaved)
whether to only show entries that have their data fully saved
void set_selection(const mask &selection)
mask applied to filename, only those marching it will be listed
void set_info_details(bool info_details)
whether output should be verbosed --> to be moved to shell output
void set_slicing_location(bool val)
whether to calculate the slice location of each file
class holding optional parameters used to proceed to the merge operation
void set_delta_signature(bool val)
void set_sequential_marks(bool sequential)
whether to activate escape sequence aka tape marks to allow sequential reading of the archive
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_compr_mask(const mask &compr_mask)
defines files to compress
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
void set_empty(bool empty)
defines whether we do a dry-run execution
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
void set_crypto_pass(const secu_string &pass)
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
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...
void set_overwriting_rules(const crit_action &overwrite)
policy to solve merging conflict
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_iteration_count(const infinint &val)
key derivation
void set_compression(compression compr_algo)
set the compression algorithm to be used
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_keep_compressed(bool keep_compressed)
make dar ignore the 'algo' argument and do not uncompress / compress files that are selected for merg...
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
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 N...
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
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 sli...
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_compression_block_size(U_I compression_block_size)
set the compression block size (0 for streamed compression)
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
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 argu...
void set_subtree(const mask &subtree)
defines the directories and files to consider
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_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
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_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
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_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
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_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
class holding optional parameters used to read an existing archive
void set_input_pipe(const std::string &input_pipe)
set the name of the input pipe to read data from (when basename is set to "-")
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices
void set_crypto_algo(crypto_algo val)
defines the the crypto cypher to use to read the archive (default is crypto_none)
void set_ref_crypto_size(U_32 ref_crypto_size)
defines the crypto size for the reference catalogue
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
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...
void set_crypto_pass(const secu_string &pass)
defines the password or passphrase to decrypt (unused if encryption is not set)
archive_options_read()
build an object and set options to their default values
void set_multi_threaded(bool val)
whether libdar is allowed to create several thread to work possibly faster on multicore CPU (need lib...
void set_ref_crypto_pass(const secu_string &ref_pass)
defines the pass for the reference catalogue
void set_ref_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices of the reference archive (where the external catalogue...
void clear()
reset all the options to their default values
void set_ignore_signature_check_failure(bool val)
whether to warn (true) or ignore (false) signature failure (default is true)
void unset_external_catalogue()
clear any reference to an external catalogue
void set_ref_crypto_algo(crypto_algo ref_crypto)
defines the crypto algo for the reference catalogue
void set_lax(bool val)
defines whether any archive coherence error, system error or media error lead to the abortion of the ...
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_header_only(bool val)
whether we only read the archive header and exit
void set_ref_slice_min_digits(infinint val)
defines the minim digit for slice number of the archive of reference (where the external catalogue is...
void set_ref_execute(const std::string &ref_execute)
set the command to execute before reading each slice of the reference catalogue
void set_output_pipe(const std::string &output_pipe)
set the name of the output pipe to send orders to (when basenale is set to "-")
void set_execute(const std::string &execute)
set the command to execute before reading each slice (empty string for no script)
void set_default_crypto_size()
set the encryption block size to the default value
void set_sequential_read(bool val)
defines whether to try reading the archive sequentially (ala tar) or using the final catalogue
void set_crypto_size(U_32 crypto_size)
the encryption block size to use to decrypt
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
archive_options_read(const archive_options_read &ref)
the copy constructor, assignment operator and destructor
void set_external_catalogue(const path &ref_chem, const std::string &ref_basename)
defines whether or not to use the catalogue from an extracted catalogue (instead of the one embedded ...
class holding optional parameters used to create an archive
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
void set_crypto_algo(crypto_algo crypto)
set the cypher 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...
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_execute(const std::string &execute)
set the command to execute after each slice creation
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_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 clear()
reset all the options to their default values
void set_info_details(bool info_details)
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_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
void set_empty(bool empty)
whether to make a dry-run operation
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
void set_display_treated(bool display_treated, bool only_dir)
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_crypto_pass(const secu_string &pass)
void set_hash_algo(hash_algo hash)
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
class holding optional parameters used to test the structure coherence of an existing archive
void set_selection(const mask &selection)
list of filenames to consider (directory not concerned by this fiter)
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_subtree(const mask &subtree)
defines the directories and files to consider
void set_empty(bool empty)
dry-run exectution if set to true
void set_display_treated(bool display_treated, bool only_dir)
void set_info_details(bool info_details)
the global action for overwriting
the arbitrary large positive integer class
the generic class, parent of all masks
the class path is here to manipulate paths in the Unix notation: using'/'
nested namespace containing routines that give features activated at compile time
compression parameters for API
contains classes that let the user define the policy for overwriting files
the crypto algoritm definition
structure used to define how to select block size for delta signature
defines the entrepot interface.
gather the ids of different filesystem to provide a filter based on filesystem
filesystem specific attributes available families and fsa_scope definition
modified_data_detection
how to detect data has changed when some fields
comparison_fields
how to consider file change during comparison and incremental backup
std::set< fsa_family > fsa_scope
set of fsa families
hash_algo
hashing algorithm available
compression
the different compression algorithm available
crypto_algo
the different cypher available for encryption (strong or weak)
are defined here basic integer types that tend to be portable
here lies a collection of mask classes
here lies a mask that selects files present in a given list
bool librsync() noexcept
returns whether delta compression is available and delta diff stuff with it
bool furtive_read() noexcept
returns whether libdar can support furtive read mode when run by privileged user
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time
libdar namespace encapsulate all libdar symbols
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
defines how to calculate delta signature block size based of file size to delta sign
void check() const
check the sanity of the provided values