mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-04 17:47:00 +03:00
F #4809: Update onedb backup federated backup utility
This commit is contained in:
parent
6a779b6066
commit
50ab087cf6
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user