From f2d83e3472f4281795a2f896a7379d62cc8f2d98 Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Fri, 31 Jan 2020 13:06:16 +0100 Subject: [PATCH] dbcopy: remove deletion of table contents --- core/src/dird/dbcopy/dbcopy.cc | 9 +++++---- .../tests/dbcopy-mysql-postgresql-test/testrunner | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/dird/dbcopy/dbcopy.cc b/core/src/dird/dbcopy/dbcopy.cc index 26646c9127d..a3acef74a6a 100644 --- a/core/src/dird/dbcopy/dbcopy.cc +++ b/core/src/dird/dbcopy/dbcopy.cc @@ -81,8 +81,9 @@ class DbCopy { std::cout << "copying tables..." << std::endl; imp->ExportTo(*exp); - - // if (cl.compare_all_rows) { imp->CompareWith(*exp); } +#if 0 + if (cl.compare_all_rows) { imp->CompareWith(*exp); } +#endif } private: @@ -141,17 +142,17 @@ class DbCopy { bool options_error{false}; int argument_count{}; - while ((c = getopt(argc, argv, "c:dl:?")) != -1 && !options_error) { + while ((c = getopt(argc, argv, "cl:?")) != -1 && !options_error) { switch (c) { case 'c': configpath_ = optarg; argument_count += 2; break; +#if 0 case 'd': empty_destination_tables = true; ++argument_count; break; -#if 0 case 'e': compare_all_rows = true; ++argument_count; diff --git a/systemtests/tests/dbcopy-mysql-postgresql-test/testrunner b/systemtests/tests/dbcopy-mysql-postgresql-test/testrunner index 4c0fbc022e3..22fe2a2461e 100755 --- a/systemtests/tests/dbcopy-mysql-postgresql-test/testrunner +++ b/systemtests/tests/dbcopy-mysql-postgresql-test/testrunner @@ -59,7 +59,7 @@ stop_bareos cp "${conf}"/bareos-dir.d/catalog/postgresql.conf.template "${conf}"/bareos-dir.d/catalog/postgresql.conf #do the database copy -"${sbin}"/bareos-dbcopy -d -c ${current_test_directory}/etc/bareos mysql postgresql +"${sbin}"/bareos-dbcopy -c ${current_test_directory}/etc/bareos mysql postgresql #enable only postgresql rm "${conf}"/bareos-dir.d/catalog/mysql.conf