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.
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.
Unfortunately, neither unloaddb nor copydb utilities will copy LOB data, and loaddb will not auto update the LOB Locator (path in the table columns). We suggest to have same LOB path on every server, and use unloaddb/loaddb utilities.
The only reliable and don't-care-about-path solution is configuring an HA environment where LOB files can be stored in different paths because in HA environment the replication is performed based on transactions, and not on the actual result data stored in the master database.