1. Field
This disclosure relates generally to data processing, file management and databases, and, more particularly, to transaction logging, log recovery and recovery of data.
2. Background
Mass changes to database records is a common business task. Erroneous updates and changes are sometimes made to database records. Should this occur, backups are typically accessed to restore database records to a previous state extant before the update was applied. This restoration process can be a cumbersome and time consuming process, particularly for those applications where targeted document restores are not available.
In one aspect of this disclosure, a computer-implemented method for content management targeted rollback is disclosed, comprising receiving at least one change to be made to a field on a document. A rollback document representing the document is stored. Metadata associated with the change and the rollback document is stored. The change is executed. A rollback request is received containing targeting metadata designating the rollback document. The document is rolled back to the rollback document that is associated with the stored metadata that corresponds to the targeting metadata.
In another aspect of this disclosure, a computer-implemented system for content management targeted rollback is disclosed, comprising a processor, and computer memory, the computer memory comprising program instructions executable by the processor to receive at least one change to be made to a field on a document. A rollback document representing the document is stored. Metadata associated with the change and the rollback document is stored. The change is executed. A rollback request is received containing targeting metadata designating the rollback document. The document is rolled back to the rollback document that is associated with the stored metadata that corresponds to the targeting metadata.
The foregoing has outlined rather generally the features and technical advantages of one or more embodiments of this disclosure in order that the following detailed description may be better understood. Additional features and advantages of this disclosure will be described hereinafter, which may form the subject of the claims of this application.
This disclosure is further described in the detailed description that follows, with reference to the drawings, in which:
This application discloses a content management targeted rollback system and method. The content management targeted rollback system and method allows the creation of a separate application for handling the journaling of records before changes are made. Records may be stored within a number of discrete documents, each document having any number of information fields. Different strategies may be used to journal updates to the documents or fields, depending on the needs of the end user.
For example, in a first strategy for journaling updates, full documents may be journaled as they are updated, capturing information in all document fields, regardless of whether each field was actually updated. This makes rolling back updates on documents easy, as it requires only a swap of the current document for the journaled version of the document. However, it requires large amounts of storage capacity, because of the capture of much extraneous data in the form of non-updated fields.
In a second strategy for journaling updates, documents may be selected for journaling, but only updated fields are journaled. Rolling back updates becomes more processor intensive, but storage capacity requirements are reduced due to the excision of unnecessary data.
In a third strategy for journaling updates, specific fields may be selected for journaling, and only updates to the selected fields are journaled. Rolling back updates under such a scheme is the most processor intensive, relative to the first two strategies. However, storage capacity is also minimal, as only desired updates are retained. There is also a risk of missing the capture of update data, if a field is erroneously unselected for journaling.
When an update occurs, the current version of the to-be-updated document or field is stored according to one of the above storage strategies. In addition, associated metadata is stored with the current version. Associated metadata may include information such as (but is not limited to) the identity of the individual who initiated the update, timestamps for the update, data sources and destinations for the update, and any other information that may be pertinent to the update. For example, an indicator metadata element may identity attached data as new data, aiding in rollback data identification, auditing and reporting. Similarly, a metadata may be attached that indicates a reason for a change or update of the data.
When an update is to be rolled back to a past version, a user may be presented with the full range of past versions for any particular document or field. The desired past version may be selected by specifying metadata associated with the past version at the time of the update. For example, the user may know that the update was initiated by a particular individual at a particular time. By specifying the identifier metadata and timestamp metadata, the user may therefore designate the desired past version to be restored.
A rollback engine 125 operates on the targeted rollback system 100. The rollback engine 125 is responsible for both receiving update operations 135 and journaling them with associated metadata, as well as receiving rollback requests and executing the resulting rollback operations. A journal 130 is a data store for the update operations 135, past versions of monitored documents 140 and/or monitored fields 145, and associated metadata. The journal 130 may be implemented within the memory device 110 (such as a database operating in random access memory), or it may be implemented on a separate and independent memory device.
Updates 135 are data operations that alter or update data extant on the database 155. Updates 135 may be received from any number of data sources, including user-generated updates, or updates generated from external processes, information flows, system operations, etc. The database 155 stores a plurality of monitored documents or data records 140, each of which contain a number of sub-fields. In embodiments implementing the third storage strategy described above, the sub-fields may be divided into monitored fields 145 and unmonitored fields 150.
The targeted rollback system 100 may then await a notice of an impending update 135 to the monitored document 140 (step 305). Update 135 notices may be received by the targeted rollback system 100 in a plurality of ways. In one embodiment, the database 155 may send a notice of the update 135 to the targeted rollback system 100. Alternatively, the targeted rollback system 100 may be interposed between the database 155 and external sources from which updates 135 may originate, and monitor network traffic to the database 155. Any strategy may be utilized to ensure that notices of updates 135 are received by the targeted rollback system 100.
Once notice of an update 135 related to a monitored document 140 is received (step 305), the rollback engine 125 may store in the journal 130 a current pre-update version 200 of the monitored document 140 (step 310), including metadata associated with the update 135. The past version 200 may be obtained from the database 155 in any manner. For example, the rollback engine 125 may request the relevant current pre-update version of the monitored document 140 from the database 155, and store it in the journal 130. Finally, the targeted rollback system 100 may allow execution of the update 135 on the monitored document 140 on database 155 (step 315). This may be executed by sending a release indicator to the database 155 allowing promulgation of the update 135.
The collection of large quantities of historical information on updates 135, past versions 200 and various types of metadata 205-235 can be advantageously leveraged in a plurality of ways. For example, the body of information may be used for auditing purposes, helping a user determine the efficacy of one or more updates, aided by the body of metadata 205-235, and the propensity of a certain type of update to cause problems (indicated by a large number of rollbacks) within the database 155.
Aspects of the present invention have been described with respect to block diagrams and/or flowchart illustrations of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer instructions. These computer instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The aforementioned programs can be written in any combination of one or more programming languages, including low-level, high-level, object-oriented or non object-oriented languages, such as Java, Smalltalk, C, and C++. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). Alternatively, the functions of the aforementioned programs can be implemented in whole or in part by computer circuits and other hardware (not shown).
The foregoing description of various embodiments of the present invention has been presented for purposes of illustration and description. It is not intended to be exhaustive nor to limit the invention to the precise form disclosed. Many modifications and variations are possible. Such modifications and variations that may be apparent to a person skilled in the art of the invention are intended to be included within the scope of the invention as defined by the appended claims.