Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



Creating and Managing Storage

LOB File Path Specification

By default, the LOB data file is stored in the <db-volumn-path>/lob directory where database volume is created. However, if the --lob-base-path option of cubrid createdb utility is used when creating the database, a LOB data file can be stored in the directory specified by option value. However, if there is no directory specified by option value, attempt to create a directory, and display an error message if it fails to create the directory. For more details, see the --lob-base-path option in Creating Database.

# image_db volume is created in the current work directory, and a LOB data file will be stored.

cubrid createdb image_db

 

# LOB data file is stored in the "/home1/data1" path within a local file system.

cubrid createdb --lob-base-path="file:/home1/data1" image_db

Checking LOB File Store Directory

# You can check a directory where a LOB file will be stored by executing the cubrid spacedb utility.

cubrid spacedb image_db

 

Space description for database 'image_db' with pagesize 16.0K. (log pagesize: 16.0K)

 

Volid  Purpose  total_size  free_size  Vol Name

 

    0  GENERIC      512.0M     510.1M  /home1/data1/image_db

Space description for temporary volumes for database 'image_db' with pagesize 16.0K.

 

Volid  Purpose  total_size  free_size  Vol Name

 

LOB space description file:/home1/data1

Changing or Expanding LOB File Store Directory

Secure disk space to create additional file storage, expand the lob-base-path of databases.txt, and change to the disk location. Restart the database server to apply the changes made to databases.txt. However, even if you change the lob-base-path of databases.txt, access to the LOB data stored in a previous storage is possible.  

# You can change to a new directory from the lob-base-path of databases.txt file.

sh> cat $CUBRID_DATABASES/databases.txt

#db-name         vol-path             db-host         log-path         lob-base-path    

image_db         /home1/data1         localhost       /home1/data1     file:/home1/data2

Backing up and Recovering of LOB Files

While backup/recovery is not supported for LOB type columns, meta data (Locator) of the LOB type columns is supported with such service.

Copying Database with LOB Files

If you are copying a database by using the cubrid copydb utility, you must configure the databases.txt additionally, as the LOB file directory path will not be copied if the related option is not specified. For more details, see the -B and --copy-lob-path options in Copying/Moving Database.