[racktables-users] Re: Migrating Servers

  • From: Denis Ovsienko <denis@xxxxxxxxxxxxx>
  • To: <racktables-users@xxxxxxxxxxxxx>
  • Date: Fri, 09 Jun 2017 12:36:20 +0100

---- On Thu, 08 Jun 2017 21:47:42 +0100  Mike King  wrote ---- 

   I’ve been having ongoing stability problems with my existing racktables 
server (Mysql Locks).  I decided I was just going to build a fresh server, 
and migrate the database.  
 
Current environment:
Racktables 0.20.12
 
I’ve setup the new server following https://github.com/RackTables/racktables ;
, copied the database/secret.php/plugins over, grabbed the latest Racktables 
0.20.13.  Hit the URL,   Got a authentication error, so changed secret.php to 
use my mysql root account., hit the URL again and got prompted to upgrade the 
database.
 
I did so, and was greeted with the main page.  Success!  ….. or so I thought. 
  When I clicked the Objects button, I was given the following error:
 
Pdo exception: PDOException
SQLSTATE[HY000]: General error: 1449 The user specified as a definer 
('rackuser'@'localhost') does not exist (HY000)
at file /var/www/RackTables-0.20.13/wwwroot/inc/database.php, line 3988
 
I remember when I setup Racktables on the orginal server , creating users 
like that (or at least seeing that username), but it’s not in the 
instructions  off the download site. So before I go trying to hack THIS new 
installation to work, let me ask…
 
What’s the correct way to migrate from one server to another? 
 
My thoughts are at the moment are:
&middot;        Drop the racktables database off the new server
&middot;        Put the secret.php file back to the way I found it
&middot;        Run thru a complete install
&middot;        Then Migrate the database 
&middot;        Then peform the upgrade on the migrated database?

1. Create a MySQL user for RackTables on the new server (must be the same as on 
the old server, should not be root).
2. Make a MySQL dump on the old server and restore it on the new server using 
the MySQL user name above.
3. Copy RackTables 0.20.12 files to the new server.
4. Check that all required system packages are installed and UTF-8 enabled in 
MySQL (see README.md).
5. Copy secret.php from the old server to the new server and adjust as 
necessary (paths, MySQL password etc) but leave the old MySQL user name.
6. RackTables should just work, use it for some time to confirm all is fine.
7. Upgrade to a newer RackTables release at a convenient time the usual way.

-- 
    Denis Ovsienko



Other related posts: