[racktables-users] How to properly backup and restore racktables database

  • From: Jon <three18ti@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 17 Apr 2015 10:22:25 -0600

Hello All,

I'm attempting to duplicate my racktables install. So I've deployed two
instances of racktables, one has a DB, the other does not.

I found this mailing list thread
<//www.freelists.org/post/racktables-users/how-to-properly-back-up-racktables,2>
of
the same title that suggests:

I just do a mysqldump and backup everything. it take less than 30 seconds.

mysqldump -u<user> -p<password> racktables > racktables.dump



so I do a:

mysqldump racktables_instance1 > racktables_instance1.dump
mysql racktables_instance2 < racktables_instance1.dump

Then I go through the configuration of the secret.php file and it stops on
step 5 telling me there is already a database with 77 tables.

However, as soon as I attempt to navigate to any of the pages I receive an
error:

Pdo exception: PDOException

SQLSTATE[HY000]: General error: 1356 View 'racktables_instance2.Rack'
references invalid table(s) or column(s) or function(s) or definer/invoker
of view lack rights to use them (HY000)
at file /var/www/html/racktables/instance2/inc/database.php, line 3979

/var/www/html/racktables/instance2/inc/database.php:3979 execute(Array
(
)
)
/var/www/html/racktables/instance2/inc/database.php:5651
usePreparedSelectBlade('SELECT COUNT(*) FROM `Rack`')
/var/www/html/racktables/instance2/inc/database.php:5660
getRowsCount('Rack')
/var/www/html/racktables/instance2/inc/interface.php:427
getEntitiesCount('rack')
renderRackspace(NULL)
/var/www/html/racktables/instance2/index.php:34
call_user_func('renderRackspace', NULL)
Error info:

Array
(
[0] => HY000
[1] => 1356
[2] => View 'racktables_instance2.Rack' references invalid table(s) or
column(s) or function(s) or definer/invoker of view lack rights to use them
)
Parameters:

GET

page rackspace
POST

COOKIE

PHPSESSID 4uieb0banu209u3rbggtqhoha3

What is the correct method for dumping the racktables database these days?

Thanks,
Jon A

Other related posts: