Before you begin:
To carry out an online backup, the user performing the backup must either be the creator of all the databank(s) being backed-up, or have the BACKUP privilege. When system databanks are included the BACKUP privilege is required.
You must also ensure that there is enough disk space available to store the backup files. If disk space is limited, consider using offline backup with operating system utilities.
To backup a database online:
1. Run the following SQL statements to initiate and execute the backup.
SQL> START BACKUP;
SQL> CREATE BACKUP IN 'backup-file-name' FOR DATABANK user-databank-name;
.
. (repeat the CREATE statement for each user databank to be backed up)
.
SQL> CREATE BACKUP IN 'backup-file-name' FOR DATABANK logdb;
SQL> CREATE BACKUP IN 'backup-file-name' FOR DATABANK sysdb;
SQL> CREATE BACKUP IN 'backup-file-name' FOR DATABANK transdb;
SQL> CREATE BACKUP IN 'backup-file-name' FOR DATABANK sqldb;
SQL> COMMIT BACKUP;
SQL> EXIT;
To ensure databank consistency, the set of CREATE BACKUP statements must be performed within a backup transaction (i.e. START BACKUP COMMIT BACKUP).
The CREATE BACKUP statements create the backup files and the data is written by the COMMIT BACKUP statement. The commit also clears the transaction log (LOGDB) entries for those databanks included in the transaction. Please note that including LOGDB in the backup set clears the entire transaction log.
2. To check the physical condition of the backup you may run the DBC databank check program to verify the backup files. For example:
dbc backup-filename report-filename sysdb-filename
.
. (repeat the dbc command for each backup file created above)
.
3. Archive the backup files, for example by copying them to a removable device.
Note: As a database backup is the starting point for any restore operation, you must store the backup files in a safe place separate from your database. You can copy them to a different disk or preferably store them on a suitable backup medium that can be removed from your machine.
Note: Databank backup file names are subject to the same restrictions that apply to the SQL statement CREATE DATABANK – see the SQL Reference Manual found in the Mimer SQL Documentation Set.
Benefits
The main advantage of online backup is that you can back-up all the databanks in your database, including the system databanks, while your Mimer SQL system is still running.
You use SQL system management statements to perform an online backup.
All backup operations are performed in the background.
The backup files are compressed and reorganized.