CN112380058A - File recovery method and equipment - Google Patents
File recovery method and equipment Download PDFInfo
- Publication number
- CN112380058A CN112380058A CN202011265738.2A CN202011265738A CN112380058A CN 112380058 A CN112380058 A CN 112380058A CN 202011265738 A CN202011265738 A CN 202011265738A CN 112380058 A CN112380058 A CN 112380058A
- Authority
- CN
- China
- Prior art keywords
- database
- dump file
- snapshot
- dump
- recovery
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000011084 recovery Methods 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000015654 memory Effects 0.000 claims description 19
- 125000004122 cyclic group Chemical group 0.000 abstract description 2
- 230000005291 magnetic effect Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004064 recycling Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention aims to provide a file recovery method and equipment, which can recover the content of a dump file to a specified virtual library so as to complete automatic recovery of the dump file, and a database for recovering the dump file can be stored as a snapshot for cyclic use. According to the method and the device, the dump files are managed, so that automatic recovery and quick recovery of the dump files are achieved, and the initialization database which can be recycled, such as a database used for recovering the dump files, can be used for recovering different dump files, so that data of the dump files can be verified conveniently.
Description
Technical Field
The present invention relates to the field of computers, and in particular, to a file recovery method and device.
Background
The Dump file is a memory image of a process, and the execution state of the program can be saved in the Dump file through a debugger. The Dump file is used to debug the driver for use by the driver writer.
Currently, there are two solutions for data recovery of database dump files:
recovery by database connection software:
the method can recover the data in the dump file, but the software has compatibility influence, which can cause the loss of the data during recovery.
Manually import through a data tool:
according to the method, a database is required to be created firstly or a corresponding table space and a corresponding user are created according to the requirement of the dump file in the existing database environment, and then the data of the dump file can be recovered, so that the operation is complex. And manual operation is easy to cause problems.
Disclosure of Invention
The invention aims to provide a file recovery method and equipment.
According to an aspect of the present invention, there is provided a file recovery method, including:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
Further, in the above method, before taking a snapshot of the database for dump file recovery, the method includes:
on the target machine for restoring the dump file, judging whether an existing database exists or not,
if not, an initialized empty library is created as the database for dump file recovery.
Further, in the above method, before taking a snapshot of the database for dump file recovery, the method includes:
and judging whether an existing database exists on the target machine for restoring the dump file, and if so, taking the existing database as the database for restoring the dump file.
Further, in the method, making a snapshot of the database for dump file recovery includes:
a snapshot is taken of either the created empty library or the existing database.
According to another aspect of the present invention, there is also provided a file recovery apparatus, wherein the apparatus includes:
the first device is used for carrying out snapshot on the database for dump file recovery;
the second device is used for establishing a corresponding virtual library by using the snapshot;
third means for restoring the contents of the dump file to the created virtual library.
Further, the apparatus further includes a fourth device, configured to determine, on the destination machine for restoring the dump file, whether an existing database exists, and if not, create an initialized empty library as the database for restoring the dump file.
Further, the apparatus further includes a fourth device, configured to determine, on the destination machine for restoring the dump file, whether an existing database exists, and if so, use the existing database as the database for restoring the dump file.
Further, in the above apparatus, the first device is configured to take a snapshot of an empty library or an existing database that is created.
According to another aspect of the present invention, there is also provided a computing-based device, including:
a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
Compared with the prior art, the method and the system can restore the content of the dump file to the designated virtual library, thereby completing the automatic restoration of the dump file, and the database for restoring the dump file can be saved as a snapshot for cyclic use. According to the method and the device, the dump files are managed, automatic recovery and quick recovery of the dump files are achieved, complicated steps required for recovering the dump files are omitted, labor cost is reduced, and the initialization database which can be recycled, such as a database used for recovering the dump files, can be used for recovering different dump files, so that data of the dump files can be verified conveniently.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic diagram illustrating a file recovery method according to an embodiment of the present invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, the present invention provides a file recovery method, including:
step S1, making a snapshot of the database for dump file recovery;
step S2, creating a corresponding virtual library by using the snapshot;
step S3, restore the content of the dump file to the created virtual library.
In this case, the present invention may restore the contents of the dump file to the designated virtual library, thereby completing the automatic restoration of the dump file, and the database for the dump file restoration may be saved as a snapshot for recycling. According to the method and the device, the dump files are managed, automatic recovery and quick recovery of the dump files are achieved, complicated steps required for recovering the dump files are omitted, labor cost is reduced, and the initialization database which can be recycled, such as a database used for recovering the dump files, can be used for recovering different dump files, so that data of the dump files can be verified conveniently.
In an embodiment of the file recovery method of the present invention, before taking the snapshot of the database for dump file recovery in step S1, the method includes:
on the target machine for restoring the dump file, judging whether an existing database exists or not,
if not, an initialized empty library is created as the database for dump file recovery.
In an embodiment of the file recovery method of the present invention, before taking the snapshot of the database for dump file recovery in step S1, the method includes:
on the target machine for restoring the dump file, judging whether an existing database exists or not,
if so, the existing database is used as the database for dump file recovery.
In an embodiment of the file recovery method of the present invention, in step S1, making a snapshot of the database for dump file recovery includes:
a snapshot is taken of either the created empty library or the existing database.
Here, on the target machine that restores the dump file, it is determined whether a database for dump file restoration needs to be created, and if so, an initialized empty library is created. Then, snapshot is made on the created empty library or the existing database, and then a virtual library is created by using the snapshot for restoring the dump file.
According to another aspect of the present invention, there is also provided a file recovery apparatus, wherein the apparatus includes:
the first device is used for carrying out snapshot on the database for dump file recovery;
the second device is used for establishing a corresponding virtual library by using the snapshot;
third means for restoring the contents of the dump file to the created virtual library.
In this case, the present invention may restore the contents of the dump file to the designated virtual library, thereby completing the automatic restoration of the dump file, and the database for the dump file restoration may be saved as a snapshot for recycling. According to the method and the device, the dump files are managed, so that automatic recovery and quick recovery of the dump files are achieved, and the initialization database which can be recycled, such as a database used for recovering the dump files, can be used for recovering different dump files, so that data of the dump files can be verified conveniently.
Further, the apparatus further includes a fourth device, configured to determine, on the destination machine for restoring the dump file, whether an existing database exists, and if not, create an initialized empty library as the database for restoring the dump file.
Further, the apparatus further includes a fourth device, configured to determine, on the destination machine for restoring the dump file, whether an existing database exists, and if so, use the existing database as the database for restoring the dump file.
Further, in the above apparatus, the first device is configured to take a snapshot of an empty library or an existing database that is created.
Here, on the target machine that restores the dump file, it is determined whether a database for dump file restoration needs to be created, and if so, an initialized empty library is created. Then, snapshot is made on the created empty library or the existing database, and then a virtual library is created by using the snapshot for restoring the dump file.
According to another aspect of the present invention, there is also provided a computing-based device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
For details of embodiments of each device and storage medium of the present invention, reference may be made to corresponding parts of each method embodiment, and details are not described herein again.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Claims (10)
1. A method of file recovery, wherein the method comprises:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
2. The method of claim 1, wherein prior to snapshotting the database for dump file recovery, comprising:
on the target machine for restoring the dump file, judging whether an existing database exists or not,
if not, an initialized empty library is created as the database for dump file recovery.
3. The method of claim 1, wherein prior to snapshotting the database for dump file recovery, comprising:
on the target machine for restoring the dump file, judging whether an existing database exists or not,
if so, the existing database is used as the database for dump file recovery.
4. The method of claim 2 or 3, wherein snapshotting a database for dump file recovery comprises:
a snapshot is taken of either the created empty library or the existing database.
5. A file recovery apparatus, wherein the apparatus comprises:
the first device is used for carrying out snapshot on the database for dump file recovery;
the second device is used for establishing a corresponding virtual library by using the snapshot;
third means for restoring the contents of the dump file to the created virtual library.
6. The apparatus of claim 5, further comprising fourth means for determining, at the destination machine for restoring the dump file, whether an existing database exists, and if not, creating an initialized empty library as the database for the dump file restoration.
7. The apparatus of claim 5, further comprising fourth means for determining, at a target machine that recovers the dump file, whether an existing database exists, and if so, taking the existing database as a database for the dump file recovery.
8. The apparatus of claim 6 or 7, wherein the first means is for taking a snapshot of an empty or existing database created.
9. A computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
taking a snapshot of a database for dump file recovery;
creating a corresponding virtual library by using the snapshot;
the contents of the dump file are restored onto the created virtual library.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011265738.2A CN112380058A (en) | 2020-11-12 | 2020-11-12 | File recovery method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011265738.2A CN112380058A (en) | 2020-11-12 | 2020-11-12 | File recovery method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112380058A true CN112380058A (en) | 2021-02-19 |
Family
ID=74583644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011265738.2A Pending CN112380058A (en) | 2020-11-12 | 2020-11-12 | File recovery method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112380058A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110093435A1 (en) * | 2009-10-21 | 2011-04-21 | Delphix Corp. | Virtual Database System |
US20140101108A1 (en) * | 2012-10-04 | 2014-04-10 | Delphix Corporation | Creating validated database snapshots for provisioning virtual databases |
CN105843707A (en) * | 2016-03-28 | 2016-08-10 | 上海上讯信息技术股份有限公司 | Quick recovery method and equipment of database |
CN108255994A (en) * | 2017-12-29 | 2018-07-06 | 上海上讯信息技术股份有限公司 | A kind of database version management method based on database snapshot |
CN108959470A (en) * | 2018-06-20 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of database data cross-platform migration method and device |
CN109739691A (en) * | 2018-12-30 | 2019-05-10 | 上海达梦数据库有限公司 | DB Backup and restoration methods, device, terminal device and storage medium |
-
2020
- 2020-11-12 CN CN202011265738.2A patent/CN112380058A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110093435A1 (en) * | 2009-10-21 | 2011-04-21 | Delphix Corp. | Virtual Database System |
US20140101108A1 (en) * | 2012-10-04 | 2014-04-10 | Delphix Corporation | Creating validated database snapshots for provisioning virtual databases |
CN105843707A (en) * | 2016-03-28 | 2016-08-10 | 上海上讯信息技术股份有限公司 | Quick recovery method and equipment of database |
CN108255994A (en) * | 2017-12-29 | 2018-07-06 | 上海上讯信息技术股份有限公司 | A kind of database version management method based on database snapshot |
CN108959470A (en) * | 2018-06-20 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of database data cross-platform migration method and device |
CN109739691A (en) * | 2018-12-30 | 2019-05-10 | 上海达梦数据库有限公司 | DB Backup and restoration methods, device, terminal device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200183795A1 (en) | Method and apparatus for processing information | |
US9710256B2 (en) | Software upgrade method and system for mobile terminal | |
CN107807839B (en) | Method and device for modifying memory data of virtual machine and electronic equipment | |
CN106802892B (en) | Method and equipment for checking consistency of main and standby data | |
US9262283B2 (en) | Method for reading kernel log upon kernel panic in operating system | |
CN105718354A (en) | Fault information reproducing method and device | |
CN111414231B (en) | Method and equipment for mutual conversion between virtual machine mirror image and container mirror image | |
JP6987340B2 (en) | Database data change request processing method and equipment | |
US20230267048A1 (en) | Master-slave architecture deployment method and device based on snapshot | |
US20090157767A1 (en) | Circular log amnesia detection | |
CN114860654A (en) | Method and system for dynamically changing Iceberg table Schema based on Flink data stream | |
CN113791934A (en) | Data recovery method, computing device and storage medium | |
CN114816816A (en) | Collapse stack information processing method, device, equipment and storage medium | |
CN111552618B (en) | Method and equipment for collecting logs | |
CN112732489B (en) | Data desensitization method and device based on database virtualization | |
CN112380058A (en) | File recovery method and equipment | |
CN107766385B (en) | Method and equipment for converting file format of virtual disk | |
CN115480880A (en) | Continuous data protection method and system and electronic equipment | |
CN115454570A (en) | Disaster recovery method, virtual machine system, device, and storage medium | |
CN111737223B (en) | File copying method, device, equipment and storage medium | |
CN112069519A (en) | Method and equipment for outputting encrypted record of information file | |
US10802715B2 (en) | Mounting a drive to multiple computing systems | |
CN112765129A (en) | Method and equipment for realizing database data version management | |
CN111858487A (en) | Data updating method and device | |
CN112131193B (en) | Application program compression method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210219 |