diff --git a/src/onedb/onedb_backend.rb b/src/onedb/onedb_backend.rb index 1713d42255..8e16dd9401 100644 --- a/src/onedb/onedb_backend.rb +++ b/src/onedb/onedb_backend.rb @@ -30,7 +30,7 @@ end class OneDBBacKEnd FEDERATED_TABLES = %w(group_pool user_pool acl zone_pool vdc_pool - marketplace_pool marketplaceapp_pool fed_logdb) + marketplace_pool marketplaceapp_pool) def read_db_version connect_db @@ -262,6 +262,18 @@ class BackEndMySQL < OneDBBacKEnd raise "Unknown error running '#{cmd}'" end + if federated + cmd = "mysqldump -u #{@user} -p'#{@passwd}' -h #{@server} " << + "-P #{@port} #{@db_name} logdb --where=\"fed_index!=-1\" "<< + " >> #{bck_file}" + + rc = system(cmd) + + if !rc + raise "Unknown error running '#{cmd}'" + end + end + puts "MySQL dump stored in #{bck_file}" puts "Use 'onedb restore' or restore the DB using the mysql command:" puts "mysql -u user -h server -P port db_name < backup_file"