System and method for creating a point-in-time restoration of a database file
AssigneeNetApp, Inc.
InventorDennis E. Chapman
Life of this patent
Estimating the term…
Abstract
The present invention provides a method for generating a point-in-time restoration of database files and associated log files by utilizing a snapshot feature of the file system storing the files. At regular intervals, snapshots, which produce read-only copies of the files, are taken along with backups of the associated log files. To restore to a given point-in-time, the snapshot and stored log files are transferred to the active file system. In a second embodiment, all log files associated with snapshots taken after the selected snapshot are also restored.
Claims14
A method for generating a point-in-time restoration of a computer data storage system, comprising:
- writing incoming data commands to a log file of a plurality of log files of the computer data storage system, and writing the contents of the log files to an active file system of the computer data storage system by a lazy write process, the lazy write process executed by an operating system of the computer data storage system;
- generating a plurality of backups, each backup generated at a selected time of a plurality of times, each backup having a snapshot of the active file system at the selected time and a copy of the log file holding commands which have not been processed into the active file system at the selected time by the lazy write process, each snapshot having a copy of a root inode of the active file system at the selected time, the snapshot stored on a data storage device of the computer data storage system;
- selecting a first backup of the plurality of backups for performing a restoration from a first time of the plurality of times, the first backup having a first snapshot taken at the first time and a first log file of the plurality of log files copied at the first time;
- verifying the selected backup by determining that all files within the first backup are valid and not corrupted;
- copying, in response to the first backup being successfully verified, the first snapshot to the active file system, and copying the first log file to the active file system;
- and
- copying the log files of the plurality of log files created later in time than the first time to the active file system,
- wherein the first snapshot enables restoration of the active file system to the first time and the log files created later in time than the first time enable restoration of files referenced by commands written into the log files after the first time.
A non-transitory computer-readable medium containing executable program instructions for generating a point-in-time restoration of an active file system, the program instructions executed by a processor, comprising:
- writing incoming data commands to a log file of a plurality of log files of a computer data storage system, and writing contents of the log files to the active file system of the computer data storage system by a lazy write process, the lazy write process executed by an operating system of the computer data storage system;
- generating a plurality of backups, each backup generated at a selected time of a plurality of times, each backup having a snapshot of the active file system at the selected time and a copy of the log file holding commands which have not been processed into the active file system at the selected time by the lazy write process, each snapshot having a copy of a root inode of the active file system at the selected time, the snapshot stored on a data storage device of the computer data storage system;
- selecting a first backup of the plurality of backups for performing a restoration from a first time of the plurality of times, the first backup having a first snapshot taken at the first time and a first log file of the plurality of log files copied at the first time;
- verifying the selected backup by determining that all files within the first backup are valid and not corrupted;
- copying, in response to the first backup being successfully verified, the first snapshot to the active file system, and copying the first log file to the active file system;
- and
- copying the log files of the plurality of log files created later in time than the first time to the active file system,
- wherein the first snapshot enables restoration of the active file system to the first time and the log files created later in time than the first time enable restoration of files referenced by commands written into the log files after the first time.
A data backup apparatus, comprising:
- an active file system maintained by a processor, a memory and a data storage device;
- a network adapter to receive incoming data commands to a log file of a plurality of log files, and the processor to write the log files to the active file system by a lazy write process, the lazy write process executed by an operating system of the processor, and the plurality of log files stored in the memory;
- the processor to generate a plurality of backups, each backup generated at a selected time of a plurality of times, each backup having a snapshot of the active file system at the selected time and a copy of the log file holding commands which have not been processed into the active file system at the selected time by the lazy write process, each snapshot having a copy of a root mode of the active file system at the selected time, the snapshot stored on the data storage device;
- the processor to select a first backup of the plurality of backups for performing a restoration from a first time of the plurality of times, the first backup having a first snapshot taken at the first time and a first log file of the plurality of log files copied at the first time;
- the processor to verify the first backup by determining that all files within the first backup are valid and not corrupted;
- the operating system to copy, in response to the backup being successfully verified, the first snapshot to the active file system, and to copy the first log file to the active file system;
- and
- the operating system to copy the log files of the plurality of log files created later in time than the first time to the active file system,
- wherein the first snapshot enables restoration of the active file system to the first time and the log files created later in time than the first time enable restoration of files referenced by commands written into the log files after the first time.
A method for generating a point-in-time restoration of a set of database data containers and a set of associated log data containers to an active file system, comprising:
- selecting a backup to restore therefrom, the backup comprising a snapshot of a file system including the set of database data containers and copies of the associated log data containers, wherein the associated log data containers and the copies of the log data containers represent changes to the active file system that occurred before the snapshot was generated but had not been incorporated into a database before the snapshot was generated;
- verifying the selected backup for coherency;
- copying, in response to the backup being coherent, the snapshot of the set of database data containers to the active file system;
- and
- copying, in response to the backup being coherent, the copies of the associated log data containers to the active file system.
Dependencies are inferred from the claim text.