| 751 | } |
| 752 | |
| 753 | void serialise_database( |
| 754 | std::string lrlpath, |
| 755 | std::string repl_type, |
| 756 | std::string repl_name, |
| 757 | const std::string& comdb2_task, |
| 758 | bool disable_log_deletion, |
| 759 | bool strip_cluster_info, |
| 760 | bool support_files_only, |
| 761 | bool run_with_done_file, |
| 762 | bool do_direct_io, |
| 763 | bool incr_create, |
| 764 | bool incr_gen, |
| 765 | bool copy_physical, |
| 766 | bool add_latency, |
| 767 | const std::string& incr_path |
| 768 | ) |
| 769 | // Serialise a database into tape archive format and write it to stdout. |
| 770 | // If support_only is true then only support files (lrl and schema) will |
| 771 | // be serialised. If disable_log_deletion and the database is running then |
| 772 | // it will be advised to hold log file deletion until the backup is complete |
| 773 | // (highly recommended!) |
| 774 | { |
| 775 | std::string dbname; |
| 776 | std::string dbdir; |
| 777 | std::string dbtxndir; |
| 778 | bool nonames = false; |
| 779 | bool has_cluster_info = false; |
| 780 | std::string origlrlname(""); |
| 781 | std::string strippedpath(""); |
| 782 | std::string templrlpath(""); |
| 783 | |
| 784 | // All support files - csc2s, extra lrls, resources for stored procedures, |
| 785 | // SSL certificates |
| 786 | // etc. |
| 787 | std::list<std::string> support_files; |
| 788 | |
| 789 | // All tables. In llmeta mode we don't have a table list |
| 790 | std::set<std::string> table_names; |
| 791 | |
| 792 | // All queues |
| 793 | std::set<std::string> queue_names; |
| 794 | std::set<std::string> queuedb_names; |
| 795 | |
| 796 | // Optional files. Nice if found, but not nececssary |
| 797 | std::list<std::string> optional_files; |
| 798 | |
| 799 | // Vector of logfile numbers to detect gaps |
| 800 | std::vector<int> logvec; |
| 801 | |
| 802 | // Iterator for logvec |
| 803 | std::vector<int>::iterator logit; |
| 804 | |
| 805 | // Current logfile, log errors |
| 806 | int curlog=0, logerr=0; |
| 807 | |
| 808 | parse_lrl_file(lrlpath, &dbname, &dbdir, &support_files, |
| 809 | &table_names, &queue_names, &nonames, &has_cluster_info); |
| 810 |
no test coverage detected