Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Restoring Strategy and Procedure

You must consider the followings before restoring databases.

  • Preparing backup files
    • Identify the directory where the backup and log files are to be stored.
    • If the database has been incrementally backed up, check whether an appropriate backup file for each backup level exists.
    • Check whether the backed-up CUBRID database and the CUBRID database to be backed up are the same version.
  • Choosing restore method
    • Determine whether to perform a partial or full restore.
    • Determine whether or not to perform a restore using incremental backup files.
    • Prepare restore tools and devices available.
  • Determining restore point
    • Identify the point in time when the database server was terminated.
    • Identify the point in time when the last backup was performed before database failure.
    • Identify the point in time when the last commit was made before database failure.
Database Restore Procedure

The following procedure shows how to perform backup and restoration described in the order of time.

  1. Performs a full backup of demodb which stopped running at 2008/8/14 04:30.
  2. Performs the first incremental backup of demodb running at 2008/8/14 10:00.
  3. Performs the first incremental backup of demodb running at 2008/8/14 15:00. Overwrites the first incremental backup file in step 2.
  4. A system failure occurs at 2008/8/14 15:30, and the system administrator prepares the restore of demodb. Sets the restore time as 15:25, which is the time when the last commit was made before database failure
  5. The system administrator prepares the full backup file created in Step 1 and the first incremental backup file created in Step 3, restores the demodb database up to the point of 15:00, and then prepares the active and archive logs to restore the database up to the point of 15:25.

Time

Command

Description

2008/8/14 04:25

cubrid server stop demodb

Shuts down demodb.

2008/8/14 04:30

cubrid backupdb -S -D /home/backup -l 0
demodb

Performs a full backup of demodb in offline mode and creates backup files in the specified directory.

2008/8/14 05:00

cubrid server start demodb

Starts demodb.

2008/8/14 10:00

cubrid backupdb -C -D /home/backup -l 1
demodb

Performs the first incremental backup of demodb online and creates backup files in the specified directory.

2008/8/14 15:00

cubrid backupdb -C -D /home/backup -l 1
demodb

Performs the first incremental backup of demodb online and creates backup files in the specified directory. Overwrites the first incremental backup file created at 10:00.

2008/8/14 15:30

 

A system failure occurs.

2008/8/14 15:40

cubrid restoredb -l 1 -d 08/14/2008:15:25:00
demodb

Restores demodb based on the full backup file, first incremental backup file, active logs and archive logs. The database is restored to the point of 15:25 by the full and first incremental backup files, the active and archive logs.