Recover a Database with rollforwarddb
Performing a roll forward (restore) of a database overwrites the current contents of the database being recovered. To perform a roll forward, you must be the DBA for the database or have the operator privilege.
The roll forward operation restores the database from the checkpoint location to the database location.
Important! After Vector is upgraded to version 2.5 or later, do not issue the rollforwarddb command using checkpoints from earlier versions of Vector. Such an operation is not supported. The upgrade process changes the database structure. Using the older checkpoints will cause the database to become inconsistent, and extra steps will be required to restore the database to a usable state. We recommend that you checkpoint (back up) your databases as soon as they are upgraded.
To recover a database from the last checkpoint and journal
Issue the following command at the operating system prompt:
rollforwarddb dbname
Note: Upon restart, the database will be in the same state it was when you took the checkpoint.
To recover a database from an old checkpoint
1. Issue the infodb command to see the list of valid checkpoints:
infodb dbname
2. Recover the database from the specific checkpoint:
Linux:
rollforwarddb '#cn' dbname
Windows:
rollforwarddb #cn dbname
where n is the checkpoint sequence number.