Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


2
(click on this box to dismiss)

How do I move a CUBRID database with LOBS from one server to another, different locations

Hi Everyone

I have a production server with an application running and the database there is installed to a certain path.

I have a development server where we have many other applications co-hosted, CUBRID is installed to another location.

I did a backup of the database on the production server which made a level 0 file in the backup folder.  I tried to no avail to restore this to my development server, it kept on complaining about the path being wrong.

Eventually I copied the whole database folder from live and overwrote the one on my development server.  The problem was that the lob information still pointed to the paths on the production server.  I had to also change <dbname>_vinf file to sort out the new paths, the lobs don't understand this.

I had to make a folder of the same path on development and copy the lob sub folder there for the development database to register this. 

How should I have done this properly, I have already looked at these documents

http://www.cubrid.org/cubrid_backup_restore

http://www.cubrid.org/cubrid_backup_restore_2

I'm looking for a solution which backs up database_one_name to database_another_name_path if I need to.  I have no problem moving the lob data between servers but the database restore must change this relative to my new paths.

I did get what I wanted right but not in a way a general user will be able to handle by themselves, I tasked a junior developer with this task as I felt the GUI tools were quite simple to understand and to use, however it was not that simple.

link comment (4)
asked 2 years ago
andrevanzuydam
26
Thank you for the answer, does the migration cater for the LOB naming convention used in the database LOB/BLOB fields, or is that an update statement that needs to be run - [Level:2]andrevanzuydam 2 years ago
I'm sorry, I don't understand your question. Can you give me more detail as to what you're referring to? - [Level:8]ginarrbrik 2 years ago
Yes, I am reading the LOB handles out of a database using PHP, but now the paths are pointed in the wrong place when I moved the database. My question above relates to this fact. Does migrating a database handle the automatic update for the lob field paths. - [Level:2]andrevanzuydam 2 years ago
You don't have to think about this. The utilities loaddb/unloaddb do exactly what they say. Unload creates a dump of the database and loaddb loads that dump. The resulting database is actually a new one with everything in place. Handles to lobs will be different but will point to where the lobs actually are in the new database. - [Level:8]ginarrbrik 2 years ago
1 Answer
0

The backup feature is not designed to be used for migrating databases. It just performs a backup of a certain database, hence the paths complains. If you want to migrate it to a new server, see migration and loading/unloading a database. You can also use the CUBRID High Availability feature if you want to have a hot/cold standby.

link comment (0)
answered 2 years ago
ginarrbrik
516
tagged




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: