Jump to content

Restore repositories from MySQL dump


Recommended Posts

Our server with Plastic installation had hardware failure and everything from this computer is lost. We use MySQL as database backend. We have 2 days old backup of all MySQL databases. What is the procedure to restore our repositories from this backup on new machine? Is there any order of steps we should follow?

Link to comment
Share on other sites

Hello!

 

I'm sorry to hear the hardware failure... :(

 

First restore the backup, you will see the "repositories" database and several "rep_X" databases, the "rep_X" databases are the Plastic SCM repositories the ones containing the source code, branches, history and so on, the "repositories" database is just and index for the "rep_x" databases.

 

Ok, once the backup is restored install the PlasticSCM server and change the db.conf to work with the new MySQL, you can review the steps and examples here: http://www.plasticscm.com/infocenter/technical-articles/kb-how-to-configure-plastic-scm-with-mysql.aspx

 

Check by running a "cm lrep" command that the databases are reachable by the Plastic SCM server.

Link to comment
Share on other sites

Great news!

 

BTW, I always recommend to setup a secondary server as a "hot backup", this server is the destination of replication operations (from the main server) every, let's say, 2 hours so if you have any hardware failure you just need to switch your clients to use the secondary server and you will loose 2 hours of work... The Replikate script works just fine doing it: http://codicesoftware.blogspot.com/2012/02/after-accidentally-cloning-sexy.html

 

Of course the traditional backup is always needed just in case....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...