4D v14Setting up a logical mirror |
|||||||||||||||||||||||||||||||||||||||||||
|
4D v14
Setting up a logical mirror
Setting up a logical mirror
4D Server offers an integrated solution that allows the setting up of a backup system via a logical mirror. This solution is based on two commands: New log file and INTEGRATE LOG FILE. A logical mirror is a sophisticated backup mode, primarily intended for critical or high-load databases. Using a logical mirror consists in operating a database on one machine and keeping a copy of it that is periodically updated on a second machine. Both machines communicate via the network with the machine in operation regularly transmitting any changes made in the database to the mirror machine via the intermediary of the log file. In this way, when there is an incident affecting the operational database, the mirror database can be used to get things back in working order quickly without any data loss. Moreover, the operational database is never “blocked” by backup operations. The use of a logical mirror corresponds to specific needs. The standard strategy based on periodic backups and the use of a log file in most cases offers a simple, reliable and inexpensive solution. The database is backed up regularly (every 24 hours in general). During backup, the database remains accessible in read-only mode. This period of partial unavailability is very short, and even in the case of large databases (greater than 2 GB), it lasts no longer than 5 minutes. This operation can even be programmed to take place outside of normal periods of database usage. Nevertheless, for certain kinds of organizations, such as hospitals for instance, critical databases must be entirely operational 24 hours a day. The database cannot be in read-only mode, even for a very short period of time. In this case, setting up a logical mirror is an appropriate solution. Note: The mirror database only reflects changes made to the data. This backup mode is not suitable for databases in the process of development, where frequent structural modifications will make the mirror rapidly obsolete or will require repeated updating of the mirror database structure. Setting up a backup system using a logical mirror is based on two new commands: New log file and INTEGRATE LOG FILE. These commands are described in the 4D Language Referemce manual. The following principles are implemented:
Setting up this system requires programming specific code, in particular:
WARNING: A backup system using a logical mirror is not compatible with “standard” backups on a database in use since the simultaneous use of these two backup modes would lead to the desynchronization of the operational and mirror databases. Consequently, you must be sure that no backups, whether automatic or manual, are carried out on the operational database. On the other hand, it is possible to backup the mirror database (see following paragraph). 4D Server can be used to carry out backups of the database on the mirror machine. To avoid risks of desynchronization with the operational machine, 4D automatically locks the mirror machine when it is carrying out one of two basic operations: the integration of the log file from the operational machine and the backup of the mirror database.
Beginning with 4D v14, you can enable the current log file on the mirror machine, which means that you can set up a "mirror-mirror," or a series of cascading mirror servers. This possibility is based on the INTEGRATE MIRROR LOG FILE command. For more information, refer to the description of this command. The following scenario illustrates, from the viewpoint of each 4D Server machine, the setting up of a backup system using a mirror:
|
PROPERTIES
Product: 4D ARTICLE USAGE
4D Server Reference ( 4D v14 R2) Inherited from : Setting up a logical mirror ( 4D v13) |
|||||||||||||||||||||||||||||||||||||||||