ohhhh!!! Haha. got it!
Thanks Drew!
Best Regards,
Jon A
On Fri, Apr 17, 2015 at 10:34 AM, Drew Bentley <dbentley@xxxxxxxxxxxxxx>
wrote:
When you do a mysqldump the way you are, it’s going to dump also:
Create database <database-name>
So it doesn’t matter what database you’re pointing it at, your dump is
reinserting it as instance_1 still. Either edit your dump file to create or
use the instance_2 you’ve created or you’ll want to dump the schema and
then the data to insert into instance_2.
-Drew
*From:* racktables-users-bounce@xxxxxxxxxxxxx [mailto:
racktables-users-bounce@xxxxxxxxxxxxx] *On Behalf Of *Jon
*Sent:* Friday, April 17, 2015 11:22 AM
*To:* racktables-users@xxxxxxxxxxxxx
*Subject:* [racktables-users] How to properly backup and restore
racktables database
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