26#ifndef ARCHIVE_OPTIONS_HPP
27#define ARCHIVE_OPTIONS_HPP
29#include "../my_config.h"
80 ~archive_options_read() =
default;
117 void set_input_pipe(
const std::string & input_pipe) { x_input_pipe = input_pipe; };
123 void set_output_pipe(
const std::string & output_pipe) { x_output_pipe = output_pipe; };
136 void set_execute(
const std::string & execute) { x_execute = execute; };
160 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; };
193 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; };
217 void set_ref_execute(
const std::string & ref_execute) { x_ref_execute = ref_execute; };
225 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; };
232 crypto_algo get_crypto_algo()
const {
return x_crypto; };
233 const secu_string & get_crypto_pass()
const {
return x_pass; };
234 U_32 get_crypto_size()
const {
return x_crypto_size; };
235 const std::string & get_input_pipe()
const {
return x_input_pipe; };
236 const std::string & get_output_pipe()
const {
return x_output_pipe; };
237 const std::string & get_execute()
const {
return x_execute; };
238 bool get_info_details()
const {
return x_info_details; };
239 bool get_lax()
const {
return x_lax; };
240 bool get_sequential_read()
const {
return x_sequential_read; };
241 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
242 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
243 bool get_ignore_signature_check_failure()
const {
return x_ignore_signature_check_failure; };
244 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
245 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
246 bool get_header_only()
const {
return x_header_only; };
247 bool get_silent()
const {
return x_silent; };
248 bool get_early_memory_release()
const {
return x_early_memory_release; };
249 bool get_force_first_slice()
const {
return x_force_first_slice; };
252 bool is_external_catalogue_set()
const {
return external_cat; };
253 const path & get_ref_path()
const;
254 const std::string & get_ref_basename()
const;
255 crypto_algo get_ref_crypto_algo()
const {
return x_ref_crypto; };
256 const secu_string & get_ref_crypto_pass()
const {
return x_ref_pass; };
257 U_32 get_ref_crypto_size()
const {
return x_ref_crypto_size; };
258 const std::string & get_ref_execute()
const {
return x_ref_execute; };
259 infinint get_ref_slice_min_digits()
const {
return x_ref_slice_min_digits; };
260 const std::shared_ptr<entrepot> & get_ref_entrepot()
const {
return x_ref_entrepot; };
266 std::string x_input_pipe;
267 std::string x_output_pipe;
268 std::string x_execute;
271 bool x_sequential_read;
272 infinint x_slice_min_digits;
273 std::shared_ptr<entrepot> x_entrepot;
274 bool x_ignore_signature_check_failure;
275 U_I x_multi_threaded_crypto;
276 U_I x_multi_threaded_compress;
279 bool x_early_memory_release;
280 bool x_force_first_slice;
285 std::string x_ref_basename;
287 secu_string x_ref_pass;
288 U_32 x_ref_crypto_size;
289 std::string x_ref_execute;
290 infinint x_ref_slice_min_digits;
291 std::shared_ptr<entrepot> x_ref_entrepot;
307 static constexpr const char* default_excluding_ea =
"user.libdar_no_backup";
364 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
403 x_file_size = file_size;
404 if(first_file_size.is_zero())
405 x_first_file_size = file_size;
407 x_first_file_size = first_file_size;
425 void set_execute(
const std::string & execute) { x_execute = execute; };
446 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
452 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
466 { exclude_by_ea = (ea_name ==
"" ? default_excluding_ea : ea_name); };
486 x_alter_atime = alter_atime;
496 void set_same_fs(
bool same_fs) { x_same_fs = same_fs; x_same_fs_include.clear(); x_same_fs_exclude.clear(); };
501 void set_same_fs_include(
const std::string & included_path_to_fs) { x_same_fs_include.push_back(included_path_to_fs); };
506 void set_same_fs_exclude(
const std::string & excluded_path_to_fs) { x_same_fs_exclude.push_back(excluded_path_to_fs); };
527 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; };
557 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; };
618 std::shared_ptr<archive> get_reference()
const {
return x_ref_arch; };
620 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
621 bool get_allow_over()
const {
return x_allow_over; };
622 bool get_warn_over()
const {
return x_warn_over; };
623 bool get_info_details()
const {
return x_info_details; };
624 bool get_display_treated()
const {
return x_display_treated; };
625 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
626 bool get_display_skipped()
const {
return x_display_skipped; };
627 bool get_display_finished()
const {
return x_display_finished; };
628 const infinint & get_pause()
const {
return x_pause; };
629 bool get_empty_dir()
const {
return x_empty_dir; };
630 compression get_compression()
const {
return x_compr_algo; };
631 U_I get_compression_level()
const {
return x_compression_level; };
632 U_I get_compression_block_size()
const {
return x_compression_block_size; };
633 const infinint & get_slice_size()
const {
return x_file_size; };
634 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
635 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
636 const std::string & get_execute()
const {
return x_execute; };
637 crypto_algo get_crypto_algo()
const {
return x_crypto; };
638 const secu_string & get_crypto_pass()
const {
return x_pass; };
639 U_32 get_crypto_size()
const {
return x_crypto_size; };
640 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
641 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
643 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
644 bool get_nodump()
const {
return x_nodump; };
645 const std::string & get_exclude_by_ea()
const {
return exclude_by_ea; };
647 const infinint & get_hourshift()
const {
return x_hourshift; };
648 bool get_empty()
const {
return x_empty; };
649 bool get_alter_atime()
const {
return x_alter_atime; };
650 bool get_furtive_read_mode()
const {
return x_furtive_read; };
651 bool get_same_fs()
const {
return x_same_fs; };
652 std::deque<std::string> get_same_fs_include()
const {
return x_same_fs_include; };
653 std::deque<std::string> get_same_fs_exclude()
const {
return x_same_fs_exclude; };
654 bool get_snapshot()
const {
return x_snapshot; };
655 bool get_cache_directory_tagging()
const {
return x_cache_directory_tagging; };
656 const infinint & get_fixed_date()
const {
return x_fixed_date; };
657 const std::string & get_slice_permission()
const {
return x_slice_permission; };
658 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
659 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
660 const infinint & get_repeat_count()
const {
return x_repeat_count; };
661 const infinint & get_repeat_byte()
const {
return x_repeat_byte; };
662 bool get_sequential_marks()
const {
return x_sequential_marks; };
663 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
664 bool get_security_check()
const {
return x_security_check; };
665 const std::string & get_user_comment()
const {
return x_user_comment; };
666 hash_algo get_hash_algo()
const {
return x_hash; };
667 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
668 const std::string & get_backup_hook_file_execute()
const {
return x_backup_hook_file_execute; };
669 const mask & get_backup_hook_file_mask()
const {
return *x_backup_hook_file_mask; };
670 bool get_ignore_unknown_inode_type()
const {
return x_ignore_unknown; };
671 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
672 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
673 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
674 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
675 bool get_delta_diff()
const {
return x_delta_diff; };
676 bool get_delta_signature()
const {
return x_delta_signature; };
677 const mask & get_delta_mask()
const {
return *x_delta_mask; }
678 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
679 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
680 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
681 bool get_auto_zeroing_neg_dates()
const {
return x_auto_zeroing_neg_dates; };
682 const std::set<std::string> & get_ignored_as_symlink()
const {
return x_ignored_as_symlink; };
684 const infinint & get_iteration_count()
const {
return x_iteration_count; };
685 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
686 bool get_never_resave_uncompressed()
const {
return x_never_resave_uncompressed; };
695 bool x_display_treated;
696 bool x_display_treated_only_dir;
697 bool x_display_skipped;
698 bool x_display_finished;
702 U_I x_compression_level;
703 U_I x_compression_block_size;
707 std::string x_execute;
711 std::vector<std::string> x_gnupg_recipients;
712 std::vector<std::string> x_gnupg_signatories;
716 std::string exclude_by_ea;
724 std::deque<std::string> x_same_fs_include;
725 std::deque<std::string> x_same_fs_exclude;
727 bool x_cache_directory_tagging;
729 std::string x_slice_permission;
730 std::string x_slice_user_ownership;
731 std::string x_slice_group_ownership;
734 bool x_sequential_marks;
736 bool x_security_check;
737 std::string x_user_comment;
740 mask * x_backup_hook_file_mask;
741 std::string x_backup_hook_file_execute;
742 bool x_ignore_unknown;
743 std::shared_ptr<entrepot> x_entrepot;
745 U_I x_multi_threaded_crypto;
746 U_I x_multi_threaded_compress;
748 bool x_delta_signature;
750 bool has_delta_mask_been_set;
753 bool x_auto_zeroing_neg_dates;
754 std::set<std::string> x_ignored_as_symlink;
758 bool x_never_resave_uncompressed;
760 void nullifyptr() noexcept;
761 void destroy() noexcept;
764 void destroy_mask(
mask * & ptr);
765 void clean_mask(
mask * & ptr);
766 void check_mask(const
mask & m);
825 x_file_size = file_size;
826 if(first_file_size.is_zero())
827 x_first_file_size = file_size;
829 x_first_file_size = first_file_size;
843 void set_execute(
const std::string & execute) { x_execute = execute; };
858 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
863 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
890 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; };
939 bool get_allow_over()
const {
return x_allow_over; };
940 bool get_warn_over()
const {
return x_warn_over; };
941 bool get_info_details()
const {
return x_info_details; };
942 const infinint & get_pause()
const {
return x_pause; };
943 compression get_compression()
const {
return x_algo; };
944 U_I get_compression_level()
const {
return x_compression_level; };
945 U_I get_compression_block_size()
const {
return x_compression_block_size; };
946 const infinint & get_slice_size()
const {
return x_file_size; };
947 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
948 const std::string & get_execute()
const {
return x_execute; };
949 crypto_algo get_crypto_algo()
const {
return x_crypto; };
950 const secu_string & get_crypto_pass()
const {
return x_pass; };
951 U_32 get_crypto_size()
const {
return x_crypto_size; };
952 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
953 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
954 bool get_empty()
const {
return x_empty; };
955 const std::string & get_slice_permission()
const {
return x_slice_permission; };
956 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
957 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
958 const std::string & get_user_comment()
const {
return x_user_comment; };
959 hash_algo get_hash_algo()
const {
return x_hash; };
960 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
961 bool get_sequential_marks()
const {
return x_sequential_marks; };
962 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
963 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
964 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
965 bool get_delta_signature()
const {
return x_delta_signature; };
966 const mask & get_delta_mask()
const {
return *x_delta_mask; }
967 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
968 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
969 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
970 const infinint & get_iteration_count()
const {
return x_iteration_count; };
971 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
972 bool get_repair_mode()
const {
return x_repair_mode; };
980 U_I x_compression_level;
981 U_I x_compression_block_size;
982 infinint x_file_size;
983 infinint x_first_file_size;
984 std::string x_execute;
988 std::vector<std::string> x_gnupg_recipients;
989 std::vector<std::string> x_gnupg_signatories;
991 std::string x_slice_permission;
992 std::string x_slice_user_ownership;
993 std::string x_slice_group_ownership;
994 std::string x_user_comment;
996 infinint x_slice_min_digits;
997 bool x_sequential_marks;
998 std::shared_ptr<entrepot> x_entrepot;
999 U_I x_multi_threaded_crypto;
1000 U_I x_multi_threaded_compress;
1001 bool x_delta_signature;
1003 bool has_delta_mask_been_set;
1004 infinint x_delta_sig_min_size;
1005 delta_sig_block_size x_sig_block_len;
1006 infinint x_iteration_count;
1010 void copy_from(
const archive_options_isolate & ref);
1011 void move_from(archive_options_isolate && ref)
noexcept;
1012 void destroy() noexcept;
1013 void nullifyptr() noexcept;
1039 void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
1078 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1105 x_file_size = file_size;
1106 if(first_file_size.is_zero())
1107 x_first_file_size = file_size;
1109 x_first_file_size = first_file_size;
1126 void set_execute(
const std::string & execute) { x_execute = execute; };
1142 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1147 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1189 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; };
1237 std::shared_ptr<archive> get_auxiliary_ref()
const {
return x_ref; };
1239 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1240 bool get_allow_over()
const {
return x_allow_over; };
1241 bool get_warn_over()
const {
return x_warn_over; };
1242 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
1243 bool get_info_details()
const {
return x_info_details; };
1244 bool get_display_treated()
const {
return x_display_treated; };
1245 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1246 bool get_display_skipped()
const {
return x_display_skipped; };
1247 const infinint & get_pause()
const {
return x_pause; };
1248 bool get_empty_dir()
const {
return x_empty_dir; };
1249 compression get_compression()
const {
return x_compr_algo; };
1250 U_I get_compression_level()
const {
return x_compression_level; };
1251 U_I get_compression_block_size()
const {
return x_compression_block_size; };
1252 const infinint & get_slice_size()
const {
return x_file_size; };
1253 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
1254 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1255 const std::string & get_execute()
const {
return x_execute; };
1256 crypto_algo get_crypto_algo()
const {
return x_crypto; };
1257 const secu_string & get_crypto_pass()
const {
return x_pass; };
1258 U_32 get_crypto_size()
const {
return x_crypto_size; };
1259 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
1260 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
1262 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
1263 bool get_empty()
const {
return x_empty; };
1264 bool get_keep_compressed()
const {
return x_keep_compressed; };
1265 const std::string & get_slice_permission()
const {
return x_slice_permission; };
1266 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
1267 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
1268 bool get_decremental_mode()
const {
return x_decremental; };
1269 bool get_sequential_marks()
const {
return x_sequential_marks; };
1270 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
1271 const std::string & get_user_comment()
const {
return x_user_comment; };
1272 hash_algo get_hash_algo()
const {
return x_hash; };
1273 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
1274 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
1275 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1276 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
1277 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
1278 bool get_delta_signature()
const {
return x_delta_signature; };
1279 const mask & get_delta_mask()
const {
return *x_delta_mask; }
1280 bool get_has_delta_mask_been_set()
const {
return has_delta_mask_been_set; };
1281 const infinint & get_delta_sig_min_size()
const {
return x_delta_sig_min_size; };
1282 delta_sig_block_size get_sig_block_len()
const {
return x_sig_block_len; };
1283 const infinint & get_iteration_count()
const {
return x_iteration_count; };
1284 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
1285 bool get_never_resave_uncompressed()
const {
return x_never_resave_uncompressed; };
1288 std::shared_ptr<archive> x_ref;
1293 crit_action * x_overwrite;
1294 bool x_info_details;
1295 bool x_display_treated;
1296 bool x_display_treated_only_dir;
1297 bool x_display_skipped;
1301 U_I x_compression_level;
1302 U_I x_compression_block_size;
1303 infinint x_file_size;
1304 infinint x_first_file_size;
1306 std::string x_execute;
1310 std::vector<std::string> x_gnupg_recipients;
1311 std::vector<std::string> x_gnupg_signatories;
1313 infinint x_min_compr_size;
1315 bool x_keep_compressed;
1316 std::string x_slice_permission;
1317 std::string x_slice_user_ownership;
1318 std::string x_slice_group_ownership;
1320 bool x_sequential_marks;
1321 infinint x_sparse_file_min_size;
1322 std::string x_user_comment;
1324 infinint x_slice_min_digits;
1325 std::shared_ptr<entrepot> x_entrepot;
1327 U_I x_multi_threaded_crypto;
1328 U_I x_multi_threaded_compress;
1329 bool x_delta_signature;
1331 bool has_delta_mask_been_set;
1332 infinint x_delta_sig_min_size;
1333 delta_sig_block_size x_sig_block_len;
1334 infinint x_iteration_count;
1336 bool x_never_resave_uncompressed;
1338 void destroy() noexcept;
1339 void copy_from(const archive_options_merge & ref);
1340 void move_from(archive_options_merge && ref) noexcept;
1341 void nullifyptr() noexcept;
1353 enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1397 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1424 void set_dirty_behavior(
bool ignore,
bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1457 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1458 bool get_warn_over()
const {
return x_warn_over; };
1459 bool get_info_details()
const {
return x_info_details; };
1460 bool get_display_treated()
const {
return x_display_treated; };
1461 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1462 bool get_display_skipped()
const {
return x_display_skipped; };
1463 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1464 bool get_flat()
const {
return x_flat; };
1466 bool get_warn_remove_no_match()
const {
return x_warn_remove_no_match; };
1467 bool get_empty()
const {
return x_empty; };
1468 bool get_empty_dir()
const {
return x_empty_dir; };
1469 t_dirty get_dirty_behavior()
const {
return x_dirty; }
1470 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
1471 bool get_only_deleted()
const {
return x_only_deleted; };
1472 bool get_ignore_deleted()
const {
return x_ignore_deleted; };
1473 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1474 bool get_ignore_unix_sockets()
const {
return x_ignore_unix_sockets; };
1475 bool get_in_place()
const {
return x_in_place; };
1481 bool x_info_details;
1482 bool x_display_treated;
1483 bool x_display_treated_only_dir;
1484 bool x_display_skipped;
1488 bool x_warn_remove_no_match;
1492 crit_action *x_overwrite;
1493 bool x_only_deleted;
1494 bool x_ignore_deleted;
1496 bool x_ignore_unix_sockets;
1499 void destroy() noexcept;
1500 void nullifyptr() noexcept;
1501 void copy_from(const archive_options_extract & ref);
1502 void move_from(archive_options_extract && ref) noexcept;
1523 virtual void clear();
1572 bool get_info_details()
const {
return x_info_details; };
1573 const mask & get_selection()
const;
1574 const mask & get_subtree()
const;
1575 bool get_filter_unsaved()
const {
return x_filter_unsaved; };
1576 bool get_user_slicing(infinint & slicing_first, infinint & slicing_others)
const;
1577 bool get_slicing_location()
const {
return x_slicing_location; };
1578 bool get_display_ea()
const {
return x_display_ea; };
1581 bool x_info_details;
1584 bool x_filter_unsaved;
1585 infinint *x_slicing_first;
1586 infinint *x_slicing_others;
1587 bool x_slicing_location;
1590 void destroy() noexcept;
1591 void nullifyptr() noexcept;
1592 void copy_from(const archive_options_listing & ref);
1593 void move_from(archive_options_listing && ref) noexcept;
1601 class archive_options_diff
1604 archive_options_diff() { nullifyptr();
clear(); };
1605 archive_options_diff(
const archive_options_diff & ref) { copy_from(ref); };
1606 archive_options_diff(archive_options_diff && ref)
noexcept { nullifyptr(); move_from(std::move(ref)); };
1607 archive_options_diff & operator = (
const archive_options_diff & ref) { destroy(); copy_from(ref);
return *
this; };
1608 archive_options_diff & operator = (archive_options_diff && ref)
noexcept { move_from(std::move(ref));
return *
this; };
1609 ~archive_options_diff() { destroy(); };
1638 void set_info_details(
bool info_details) { x_info_details = info_details; };
1643 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1663 x_alter_atime = alter_atime;
1670 void set_hourshift(
const infinint & hourshift) { x_hourshift = hourshift; };
1673 void set_compare_symlink_date(
bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1679 void set_in_place(
bool arg) { x_in_place = arg; };
1690 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1691 bool get_info_details()
const {
return x_info_details; };
1692 bool get_display_treated()
const {
return x_display_treated; };
1693 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1694 bool get_display_skipped()
const {
return x_display_skipped; };
1695 const mask & get_ea_mask()
const {
if(
x_ea_mask ==
nullptr)
throw SRC_BUG;
return *
x_ea_mask; };
1697 bool get_alter_atime()
const {
return x_alter_atime; };
1698 bool get_furtive_read_mode()
const {
return x_furtive_read; };
1699 const infinint & get_hourshift()
const {
return x_hourshift; };
1700 bool get_compare_symlink_date()
const {
return x_compare_symlink_date; };
1701 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1702 bool get_in_place()
const {
return x_in_place; };
1703 bool get_auto_zeroing_neg_dates()
const {
return x_auto_zeroing_neg_dates; };
1708 bool x_info_details;
1709 bool x_display_treated;
1710 bool x_display_treated_only_dir;
1711 bool x_display_skipped;
1716 bool x_furtive_read;
1717 infinint x_hourshift;
1718 bool x_compare_symlink_date;
1721 bool x_auto_zeroing_neg_dates;
1723 void destroy() noexcept;
1724 void nullifyptr() noexcept;
1725 void copy_from(const archive_options_diff & ref);
1726 void move_from(archive_options_diff && ref) noexcept;
1782 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1792 const mask & get_subtree()
const {
if(
x_subtree ==
nullptr)
throw SRC_BUG;
return *
x_subtree; };
1793 bool get_info_details()
const {
return x_info_details; };
1794 bool get_display_treated()
const {
return x_display_treated; };
1795 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1796 bool get_display_skipped()
const {
return x_display_skipped; };
1797 bool get_empty()
const {
return x_empty; };
1802 bool x_info_details;
1803 bool x_display_treated;
1804 bool x_display_treated_only_dir;
1805 bool x_display_skipped;
1808 void destroy() noexcept;
1809 void nullifyptr() noexcept;
1810 void copy_from(const archive_options_test & ref);
1811 void move_from(archive_options_test && ref) noexcept;
1861 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1879 x_file_size = file_size;
1880 if(first_file_size.is_zero())
1881 x_first_file_size = file_size;
1883 x_first_file_size = first_file_size;
1897 void set_execute(
const std::string & execute) { x_execute = execute; };
1917 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1922 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1948 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; };
1973 bool get_allow_over()
const {
return x_allow_over; };
1974 bool get_warn_over()
const {
return x_warn_over; };
1975 bool get_info_details()
const {
return x_info_details; };
1976 bool get_display_treated()
const {
return x_display_treated; };
1977 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1978 bool get_display_skipped()
const {
return x_display_skipped; };
1979 bool get_display_finished()
const {
return x_display_finished; };
1980 const infinint & get_pause()
const {
return x_pause; };
1981 const infinint & get_slice_size()
const {
return x_file_size; };
1982 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
1983 const std::string & get_execute()
const {
return x_execute; };
1984 crypto_algo get_crypto_algo()
const {
return x_crypto; };
1985 const secu_string & get_crypto_pass()
const {
return x_pass; };
1986 U_32 get_crypto_size()
const {
return x_crypto_size; };
1987 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
1988 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
1989 bool get_empty()
const {
return x_empty; };
1990 const std::string & get_slice_permission()
const {
return x_slice_permission; };
1991 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
1992 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
1993 const std::string & get_user_comment()
const {
return x_user_comment; };
1994 hash_algo get_hash_algo()
const {
return x_hash; };
1995 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
1996 const std::shared_ptr<entrepot> & get_entrepot()
const {
return x_entrepot; };
1997 U_I get_multi_threaded_crypto()
const {
return x_multi_threaded_crypto; };
1998 U_I get_multi_threaded_compress()
const {
return x_multi_threaded_compress; };
1999 const infinint & get_iteration_count()
const {
return x_iteration_count; };
2000 hash_algo get_kdf_hash()
const {
return x_kdf_hash; };
2006 bool x_info_details;
2007 bool x_display_treated;
2008 bool x_display_treated_only_dir;
2009 bool x_display_skipped;
2010 bool x_display_finished;
2012 infinint x_file_size;
2013 infinint x_first_file_size;
2014 std::string x_execute;
2018 std::vector<std::string> x_gnupg_recipients;
2019 std::vector<std::string> x_gnupg_signatories;
2021 std::string x_slice_permission;
2022 std::string x_slice_user_ownership;
2023 std::string x_slice_group_ownership;
2024 std::string x_user_comment;
2026 infinint x_slice_min_digits;
2027 std::shared_ptr<entrepot> x_entrepot;
2028 U_I x_multi_threaded_crypto;
2029 U_I x_multi_threaded_compress;
2030 infinint x_iteration_count;
2033 void nullifyptr() noexcept {};
2034 void copy_from(
const archive_options_repair & ref);
2035 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_never_resave_uncompressed(bool val)
never try resaving uncompressed when compression ratio is bad
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 from the current existing binary delta signatures and drop/recalculate for file t...
void set_delta_signature(bool val)
whether signature to base binary delta on, has to be transfered from the source to the isolated catal...
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_repair_mode(bool mode)
repair mode making at most rebuild a catalog from a truncate or corrupted backup
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_never_resave_uncompressed(bool val)
never try resaving uncompressed when compression ratio is bad
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_force_first_slice(bool val)
whether to ask the first slice in place of the last slice when reading an archive with the help of an...
void set_ignore_signature_check_failure(bool val)
whether to warn (false) or ignore (true) signature failure (default is false, signature failure is re...
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_early_memory_release(bool val)
whether to perform early memory release of the 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 ...
void set_silent(bool val)
whether to avoid display message about the fact a wrong key is not possible to detect when reading cy...
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_kdf_hash(hash_algo algo)
hash algo used for key derivation
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_iteration_count(const infinint &val)
key derivation
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)
const infinint default_iteration_count
default iteration count for all KDF hash algo except argon2
const infinint default_iteration_count_argon2
default iteration count for argon2 KDF hash
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