Performing Regular Backups

From InterBase

Go Up to Database Tuning Tasks


There are several performance-related benefits to doing periodic backup and restore of an InterBase database. See About InterBase backup and restore options.

Increasing Backup Performance

  • Disable garbage collection if you are just going to replace the database immediately anyway; this can make the backup execute faster.
  • Back up to a different disk drive.

Increasing Restore Performance

  • Restore from a different disk drive.
  • Disable indexes on restore; this makes the restore execute faster, so you have a usable database quickly. You must then have to activate manually the indexes after the restore is complete.
Tip:
Create a SQL script with all the ALTER INDEX statements necessary to activate your indexes, and keep that handy. Use it like a batch file with isql -i script.sql to help automate this procedure. You can create this script with this query:
SELECT 'ALTER INDEX ' || RDB$INDEX_NAME || ' ACTIVE;'
FROM RDB$INDICES
WHERE RDB$SYSTEM_FLAG = 0 OR RDB$SYSTEM_FLAG IS NULL;

You can get the database up and restored more quickly, and then activate indexes afterwards. The data is accessible even if the indexes are inactive, but it is slower to query the tables.

Advance To: