Creating a database copy

3 posts / 0 new
Last post
StephenHutchings
StephenHutchings's picture
Offline
Last seen: 3 years 9 months ago
Joined: Sep 13 2010
Junior Boarder

Posts: 16

Stephen Hutchings
Creating a database copy

Hi,

Could anyone advise on the best way to copy an existing InfiniDB database from one Windows machine to another?

I copied the "mysqldb" and "data1" directories from my existing InfiniDB instance to the InfiniDB install directory on my second machine, as per the (Linux-oriented) backup instructions in the Admin guide. (Actually that's slightly inaccurate - I copied the contents of the "mysqldb" directory (calpontsys, mysql and folders, but not the .err and .pid files).

I didn't suspend DB writes (but I didn't perform any writes during the above copy either. There may well have been queries running.). Is it possible to suspend writes on the Community Edition? If so, how do I achieve this on Windows?

When I restarted InfiniDB on my second machine, it successfully runs DESC on a table, but when I run e.g. a simple SELECT COUNT(*) it displays "ERROR 138 (HY000): pColStep: BRM error!".

At the moment I am running a script to do a SELECT TO OUTFILE on the original DB with a view to running cpimport on those outfiles on my "new" copy. As I only have 5 tables, that's fairly simple, but I wonder if there is a better way or why my original "backup" didn't seem to work.

Any advice please?

davidhill
davidhill's picture
Offline
Last seen: 3 days 2 hours ago
Joined: Oct 27 2009
Administrator

Posts: 595

david hill
Re:Creating a database copy

There is one other set of files that you will need to copy over and those are the files in the \dbrm directory.

Generally it is best to stop the infinidb before copying/moving the files in the community version.

I will followup with checking out the Admin guide associated to backup instructions to make sure it covers the dbrm files.

And you are correct, the community version doesn't support suspend-database functionality.

EDIT:

The Admin guide did mention the DBRM files. On the Enterprise version, they are located in the data1 directory and will get backed when data1 is backed up. On the Community edition, they reside in the directory called /dbrm. So they need to be backed up/copied seperately.

StephenHutchings
StephenHutchings's picture
Offline
Last seen: 3 years 9 months ago
Joined: Sep 13 2010
Junior Boarder

Posts: 16

Stephen Hutchings
Re:Creating a database copy

Thanks for the advice David,

I note your comment that DBRM is in a different place for the Enterprise edition than on the Community edition. And I agree, on re-reading, the Admin guide does indeed mention the DBRM files, although my reading of the instructions themselves had me simply copying the "datan" directories.