Skip to content

Commit

Permalink
dbcopy: remove deletion of table contents
Browse files Browse the repository at this point in the history
  • Loading branch information
franku authored and pstorz committed Jan 31, 2020
1 parent 425425c commit f2d83e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions core/src/dird/dbcopy/dbcopy.cc
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion systemtests/tests/dbcopy-mysql-postgresql-test/testrunner
Expand Up @@ -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
Expand Down

0 comments on commit f2d83e3

Please sign in to comment.