N to M host system copy

A system includes obtaining of a backup of the source database system comprising N hosts and a first plurality of servers, where N is an integer greater than one, access of a target database system comprising M hosts, where M is an integer less than N, configuration of the target database system to include the first plurality of servers, and performance of a database recovery of the target database system using the backup of the source database system.

BACKGROUND

Modern database systems provide processes for generating database backups and for using such backups to recover from database crashes. These backups may also be used to copy a database to a second database system. More specifically, the backups generated by a first database system are used to perform a database recovery operation on the second database system. As a result, the second database system is a copy of the first database system at the time of the backup generation. The foregoing operation is unavailable if the number of hosts within the first database system is different from the number of hosts within the second database system.

DETAILED DESCRIPTION

The following description is provided to enable any person in the art to make and use the described embodiments and sets forth the best mode contemplated for carrying out some embodiments. Various modifications, however, will remain readily apparent to those in the art.

FIG. 1is a block diagram including database system110, database system120and backup130. Backup130was generated during a backup operation of system110.FIG. 1generally illustrates the operation of copying database system110onto database system120using backup130.

Database system110includes hosts112,114and116. One of hosts112,114and116is designated a Master while the other two are designated as Workers. The data stored within the memories of hosts112,114and116, taken together, represent the full database of database system110.

Similarly, database system120includes hosts122and124, with one host designated a Master and the other host designated a Worker. According to some embodiments, database system110is a production system which is used to provide database services during the course of business, while database system120is used for Quality Assurance and/or development. Accordingly, database system120includes only two hosts in order to save on hardware costs.

In this regard, each host ofFIG. 1includes at least one processor and a memory device, and is responsible for managing a dedicated portion of physical memory, regardless of where that physical memory is located. In some embodiments, the memory of hosts112,114116,122and124is implemented in Random Access Memory (e.g., cache memory for storing recently-used data) and one or more fixed disks (e.g., persistent memory for storing their respective portions of the full database). Alternatively, one or more of hosts112,114,116,122and124may implement an “in-memory” database, in which volatile (e.g., non-disk-based) memory (e.g., Random Access Memory) is used both for cache memory and for storing its entire respective portion of the full database. In some embodiments, the data of the full database may comprise one or more of conventional row-based data, column-based data, and object-based data.

Backup130comprises one or more elements generated during a backup of system110. Backup130may therefore comprise one or more files within a file system or an electronic structure created by a backup tool, in any size and/or format, which may be used to recover system110to its pre-backup state. As mentioned in the Background, it is desired to use backup130to create a copy of system110within system120.

FIG. 2comprises a flow diagram of process200according to some embodiments. In some embodiments, various hardware elements of system120execute program code to perform process200. Process200and all other processes mentioned herein may be embodied in processor-executable program code read from one or more of non-transitory computer-readable media, such as a floppy disk, a CD-ROM, a DVD-ROM, a Flash drive, and a magnetic tape, and then stored in a compressed, uncompiled and/or encrypted format. In some embodiments, hard-wired circuitry may be used in place of, or in combination with, program code for implementation of processes according to some embodiments. Embodiments are therefore not limited to any specific combination of hardware and software.

Initially, at S210, a backup of a source database system is created. S210may comprise any type of backup operation that is or becomes known, and the backup which is created at S210may comprise any number and/or type of electronic structure.

In one example of S210, a database administrator logs on to the source database system via an administration device and interface, and issues an instruction to create a backup. Such an interface may be generated and displayed by an application executing on the administration device, may comprise a Web page or other interface provided to the administration device by the source database system and displayed thereby, or may be displayed by any other means.

The source database system includes N hosts, N being a positive integer. According to some embodiments, each of the N hosts of the source database system executes one or more services. Each service is associated with particular data of the source database system. Creation of a backup at S210may therefore include generation of a data backup for each service, which backs up the particular data associated with the service.

FIG. 3illustrates one implementation of database system110ofFIG. 1, for use in describing an example of process200according to some embodiments. As shown, Master host112includes a master name server, a statistics server, an XS engine, and an index server. Hosts114and116each include a respective index server. As described above, creation of a data backup of database system110ofFIG. 3includes creation of a first data backup associated with the master name server, a second data backup associated with the statistics server, a third data backup associated with the XS engine, a fourth data backup associated with the index server of host112, a fifth data backup associated with the index server of host114, and a sixth data backup associated with the index server of host116.

Master host112also includes a topology file describing the topology of database system110. The topology is stored in the data volume of the master name server and is therefore backed-up as part of the data backup associated with the master name server. According to some embodiments, the topology is also backed up separately as a seventh data backup.

Returning to process200, a target database system is installed at S220. The target database system includes M hosts, with M being an integer<N. Installation of the target database system may occur prior to S210according to some embodiments.

In one example, installation of the target database system includes loading program code onto selected hardware and using an administration interface to define hosts and services of the target database system. The host definition may be specified in a “nameserver.ini” file which is visible across the entire target database system. The nameserver.ini file lists all hosts and their respective roles (e.g., Master, Worker or Standby). Each host is further associated with a dedicated “daemon.ini” file which contains a list of services which will be started by a host-specific daemon when the host starts.

FIG. 4illustrates an implementation of database system120ofFIG. 1, for use in describing an example of a target database system according to some embodiments. Target database system120includes M=2 hosts. Master host122includes a master name server, a statistics server, an XS engine, and an index server, while host124includes an index server.

At S230, the target database system is configured to include each server of each host of the source database system. Configuration at S230may include modifying one or more daemon.ini files to specify one or more additional services on the corresponding hosts. With respect to the present example, target database system120includes each service of source database system110, with the exception of one index server. Accordingly, at S230, target database system120is configured to add an additional index server.FIG. 5shows the services of target system120after S230according to some embodiments. As shown, an additional index server has been added to host124.

According to some embodiments, target database system120may provide a design studio to allow reconfiguration of the target database system via graphical user interfaces displayed on an administration device. In other embodiments, S230may be executed by transmitting a corresponding Structured Query Language statement to database system120via an administration device. For example, to add one indexserver service to the host ‘lu4711’ the following statement may be used in some embodiments:

Next, at S240, a database recovery is performed on the target database system based on the backup. For example, the backup files created at S210are used in conjunction with a recovery operation executing on the target database system. As a result, the target database system is a functional copy of the source database system as it existed immediately prior to the backup operation of S210.

FIG. 6is a flowchart of process600to perform database recovery on a target database system according to some implementations of S240. Initially, at610, a Master host of the target database system is determined. The Master host may be determined from the nameserver.ini file of the target database system.

Next, at S620, the Master host is started and the master name server on the Master host is initialized. The master name server receives a recovery statement in order begin the recovery operation.

The backed-up topology of the source database system is accessed at S630. As described above, the topology is backed up independently of the service-specific data backups of the source database system. The topology is stored in main memory (e.g., Random Access Memory) of the target database system.

At S640, it is determined whether the source database system includes more hosts than the target database system. The number of hosts of the target database system is determined based on the Worker tag in the nameserver.ini file. If the source database system does not include more hosts than the target database system, flow proceeds to S650to update the stored topology with the host names of the target database system. These names may be listed in the nameserver.ini file as mentioned above. Updating the topology may simply consist of substituting the host names of the source database system with the host names of the target database system. Flow then continues to S670.

Alternatively, flow proceeds from S640to S660if the source database system includes more hosts than the target database system. At S660, a new topology is created in the main memory of master name server of the target database system. The new topology include hosts as specified in the nameserver.ini file of the target database system. Also, the topology assigns the database services listed in the daemon.ini file to the specified hosts, for example in round-robin fashion. As mentioned above, the daemon.ini file of the target database system was previously reconfigured to include the services of the source database system (e.g., at S230). Accordingly, the recreated topology includes all of the services of the source database system, distributed among the hosts of the target database system.

Next, at S670, a recovery operation is performed on the target database using the backup files and the updated topology. The service-specific parts of the backup job are recovered to the corresponding services of the target database system. For example, the master name server data backup is recovered to the master name server of the target database system. With respect to the example ofFIGS. 3 and 5, the backups for two of the index servers of system110are recovered to the index servers of host124of system120.

After completion of the recovery operation, it is determined at S680whether source database system includes fewer hosts than the target database system. As mentioned above, the number of hosts of the target database system may be determined based on the Worker tag in the nameserver.ini file. If the source database system includes fewer hosts than the target database system, flow proceeds to S685to update the stored topology to include the additional (i.e., as-yet unused) host names of the target database system.

Flow proceeds to S690from S685or after a negative determination at S680. The new topology is written to the data volume of the master name server of the target database system at S690. The topology is thus persisted such that each subsequent restart of the target database system will use that topology.

FIG. 7is a block diagram of system700according to some embodiments. System700illustrates one hardware architecture implementing system110and/or120as described above, but implementations of either system110or120are not limited thereto. Elements of system700may therefore operate to execute process200and/or600as described above.

Database master712and each of database workers714and716may comprise a multi-processor “blade” server. Each of database master712and database workers714and716may operate as described herein with respect to database hosts, and database master712may perform additional transaction management functions and other master server functions which are not performed by database workers714and716as is known in the art.

According to some embodiments, hosts712,714and716each execute processes to provide the data of a full database to database applications. More specifically, database system700may communicate with one or more database applications over one or more interfaces (e.g., a Structured Query Language (SQL)-based interface) in order to provide data thereto.

Application server740may also comprise a multi-processor blade server. Application server740, as described above, may execute database applications to provide functionality to end users operating user devices, such as business reporting, inventory control, online shopping, and/or any other suitable functions. Application server740may also receive administrative instructions from administration device750according to some embodiments. Such instructions may comprise instructions to execute backup and/or recovery operations, to update a topology, etc.

Database master712and database workers714and716are connected via network switch720, and are thereby also connected to shared storage730. Shared storage730and all other memory mentioned herein may comprise any appropriate non-transitory storage device, including combinations of magnetic storage devices (e.g., magnetic tape, hard disk drives and flash memory), optical storage devices, Read Only Memory (ROM) devices, etc.

Shared storage730may comprise the persistent storage of a database instance distributed among database master712and database workers714and716. As such, various portions of the data within shared storage730may be allotted (i.e., managed by) one of database master712and database workers714and716.

The data of database system700may be received from disparate hardware and software systems, some of which are not interoperational with one another. The systems may comprise a back-end data environment employed in a business or industrial context. The data may be pushed to database system700and/or provided in response to queries received therefrom.

Database system700and each element thereof may also include other unshown elements that may be used during operation thereof, such as any suitable program code, scripts, or other functional data that is executable to interface with other elements, other applications, other data files, operating system files, and device drivers. These elements are known to those in the art, and are therefore not described in detail herein.