Database Backup and Restoration
A well-designed database application is of no use if data and the application is not available 100% of the time. Data loss and corruption are not common on most systems, but occasional occurrences are unavoidable. Some of the events that can cause data loss include the following:
|User error||Individual records, or even entire files, can be erased by accident or with malicious intent|
|Abnormal termination||Files can be corrupted if the software is interrupted in the middle of an update by events such as a power failure, a system shutdown or restart, or a signal from the user or operation system to terminate execution.|
|Hardware failure||Data can be lost if a disk suddenly becomes unreadable for some reason.|
Because events such as these can happen anywhere, at any time, you should take the time now to plan how to handle a possible future data loss. Your plan should include a policy regarding the intervals at which you check the integrity of your database. Zim provides built-in protection against these events. Zim Server, the module responsible for data handling, provides protection against abnormal termination by recording all modifications made to the database in a common transaction file and then applying these modifications to the database. If transactions cannot successfully end for any reason, these transaction records are ignored. If Zim Server itself is ended before applying modifications, next execution of Zim Server automatically brings the database to a valid state. General guidelines to keep a database running can comprise:
Because each application is different, modify or adapt the ideas presented in this section to suit your own requirements.