+

CN112559254B - Backup file retaining method and device, electronic equipment and storage medium - Google Patents

Backup file retaining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112559254B
CN112559254B CN202011552760.5A CN202011552760A CN112559254B CN 112559254 B CN112559254 B CN 112559254B CN 202011552760 A CN202011552760 A CN 202011552760A CN 112559254 B CN112559254 B CN 112559254B
Authority
CN
China
Prior art keywords
file
reservation
backup
retaining
generating
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.)
Active
Application number
CN202011552760.5A
Other languages
Chinese (zh)
Other versions
CN112559254A (en
Inventor
刘洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Electronic Soul Network Technology Co Ltd
Original Assignee
Hangzhou Electronic Soul Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Electronic Soul Network Technology Co Ltd filed Critical Hangzhou Electronic Soul Network Technology Co Ltd
Priority to CN202011552760.5A priority Critical patent/CN112559254B/en
Publication of CN112559254A publication Critical patent/CN112559254A/en
Application granted granted Critical
Publication of CN112559254B publication Critical patent/CN112559254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a method and a device for retaining a backup file, electronic equipment and a storage medium, belonging to the technical field of file backup, wherein the method comprises the following steps: receiving a reservation instruction of a backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information; generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date; and generating a file retaining list according to the number sequence, and retaining the backup files according to the file retaining list. The method can save storage resources while guaranteeing data precision.

Description

Backup file retaining method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of file backup technologies, and in particular, to a method and apparatus for retaining a backup file, an electronic device, and a storage medium.
Background
In normal operation of an enterprise, key data such as platform account data, recharging data, passing data, game role data and the like need to be backed up every day. And, backup data typically requires storage and retention from elsewhere via network transmissions. The game databases are huge, each game has at least one database, and enterprises can generate a large number of backup files every day. Backup data is typically used for failover or historical data exercise. For the reservation of these large numbers of files, the following is generally adopted:
(1) All retention policies: according to project requirements, reserving all data within a certain time;
(2) Average retention policy: data is kept at a fixed frequency according to project requirements.
According to the above manner, 1095TB off-site storage space is required if backup data is kept for 3 years in 1TB backup per day. In reality, the data generated by enterprise operation is far higher than the above-mentioned amount. It can be seen that conventional reservation strategies result in a significant waste of storage resources.
Moreover, since the files stored in the different locations need to be checked for integrity periodically to ensure availability of all the files stored, the more backup files that are stored, the higher the cost of verification.
Therefore, how to save storage resources for the reservation of backup data is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a storage medium for reserving backup files, which at least solve the problem of saving storage resources aiming at reserving backup data in the related technology.
In a first aspect, an embodiment of the present application provides a method for preserving a backup file, including: receiving a reservation instruction of a backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information; generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date; and generating a file reservation list according to the sequences, and reserving the backup files according to the file reservation list.
In some embodiments, before receiving the reservation instruction of the backup file, the method includes: setting an importance level for the backup file according to the service importance; and generating the reservation instruction according to the importance level, wherein the reservation duration information and the reservation quantity information carried by the reservation instruction are associated with the importance level.
In some embodiments, after receiving the backup file reservation instruction, the method includes: according to the file MD5 (Message-Digest Algorithm), a damaged file is found and deleted.
In some embodiments, after receiving the backup file reservation instruction, the method includes: searching the expiration file according to a preset expiration rule, and deleting the expiration file.
In some of these embodiments, generating the file retention list from the array comprises: screening out seed backup files according to the retention time information and the retention quantity information; and adding the seed backup file into the file retention list.
In a second aspect, an embodiment of the present application provides a device for preserving a backup file, including: the device comprises a receiving module, a generating module and a reserving module. The receiving module is used for receiving a reservation instruction of the backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information; the generation module is used for generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date; and the retaining module is used for generating a file retaining list according to the number sequence and retaining the backup files according to the file retaining list.
In some embodiments, the apparatus further includes a setting module, configured to set an importance level for the backup file according to the importance of the service; and generating the reservation instruction according to the importance level, wherein the reservation duration information and the reservation quantity information carried by the reservation instruction are associated with the importance level.
In some embodiments, the apparatus further includes a searching module configured to search for a damaged file according to the file MD5, and delete the damaged file.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a storage medium storing a computer program, where the computer program when executed by the processor implements a method for preserving a backup file as set forth in any one of the preceding claims.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for preserving a backup file as set forth in any one of the preceding claims.
According to the above, the method for retaining the backup file according to the embodiment of the present application includes: receiving a reservation instruction of a backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information; generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date; and generating a file retaining list according to the number sequence, and retaining the backup files according to the file retaining list. By the embodiment of the application, the shorter the distance from the current time is, the shorter the reserved interval date is; the farther from the current time, the longer the hold interval date. Thus, the reserved backup data has the following characteristics: the closer to the current time, the higher the reserved data precision; the farther from the current time, the lower the data accuracy that remains. The method accords with the actual use condition of backup data: the closer to the current time, the higher the frequency of use; the further from the current time, the lower the frequency of use. Therefore, the storage resource can be saved while the data precision is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method of preserving backup files according to an embodiment of the application;
FIG. 2 is an expression schematic of a array according to an embodiment of the application;
FIG. 3 is a flow chart of a retention policy according to an embodiment of the application;
FIG. 4 is a diagram of relevant codes according to an embodiment of the present application;
FIG. 5 is a diagram of relevant codes according to an embodiment of the present application;
FIG. 6 is a block diagram of a backup file retaining apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
As described above, the adoption of the conventional full reservation strategy results in a great waste of storage resources, while the conventional approach also provides an average reservation strategy: the data is reserved at a fixed frequency, so that the reserved number of backup files can be reduced to a certain extent. However, in the normal operation of the maintenance enterprise, the backup data plays a vital role, and particularly when the fault repair is needed, if the fixed frequency is larger, the accuracy of the reserved backup data is low, so that the fault repair is not ideal. Therefore, the fixed frequency is usually smaller, for example, one part is reserved every two days, so that the saved resources are very limited. It can be seen that it is difficult to balance both the accuracy of the reserved data with the cost of the storage resources.
Accordingly, an embodiment of the present application provides a method for preserving a backup file, and fig. 1 is a flowchart of a method for preserving a backup file according to an embodiment of the present application, as shown in fig. 1, where the method includes:
s100: receiving a reservation instruction of a backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information;
S200: generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date;
S300: and generating a file retaining list according to the number sequence, and retaining the backup files according to the file retaining list.
Based on the above, the reserved backup data has the following characteristics: the closer to the current time, the higher the reserved data precision; the farther the distance from the current time is, the lower the reserved data precision is, so that the method is matched with the actual use condition of backup data: the closer to the current time, the higher the frequency of use; the further from the current time, the lower the frequency of use. The method not only meets the precision requirement of the reserved data, but also greatly saves the storage resource, and solves the problem that the precision of the reserved data and the cost of the storage resource are difficult to balance.
In order to more clearly illustrate the present application, the following describes the steps in detail.
Step S100: and receiving a reservation instruction of the backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information. The method comprises the steps of setting an importance level for the backup file according to the service importance, and then manually inputting or automatically generating the reservation instruction according to the importance level, wherein the reservation duration information and/or the reservation quantity information carried by the reservation instruction are associated with the importance level. For example, according to the importance of the service, the following settings are made for the reservation of platform account data, subsystem data, and game character data, respectively:
Platform account data: the level is one level, the retention time is 3 years, and the retention number is 600 copies;
Data via a subsystem: the level is two, the retention time is 5 years, and the retention number is 300 copies;
game character data: the level is three, the retention time is 2 years, and the retention number is 100 copies;
it can be seen that the more important the backup data, the more the number of reservations, and at the same time, in some business scenarios, the longer the reservation time can be.
Step S200: and generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date. The above-mentioned columns may be used as an expression of the retention policy in the embodiment of the present application.
As an example, fig. 2 is an expression schematic of a sequence of numbers according to an embodiment of the present application, as shown in fig. 2, the sequence evolves: "1" means that backup data is reserved, and "0" means that backup data is not reserved. Since the backup file is data generated by history, the first number on the left represents an element corresponding to the current date, and elements corresponding to dates far from the history are sequentially arranged from the left to the right. For example, the current time is 12 months and 23 days, and is 12 months and 22 days, 12 months and 21 days, and 12 months and 20 days … … in order from right. While the vertical "first day", "second day" … … "seventh day" represents a retention policy that simulates future times.
With continued reference to fig. 2, for example, an item needs to hold 10 backup files for 30 days, and for example, the first row of elements in the series includes "1" and "0", there are 30 elements in total, and each element corresponds to a date, wherein 10 elements of "1" hold 10 backup files, and the further from the current time (i.e., the further the series goes to the right in the lateral direction), the longer the continuous unreserved time, i.e., the longer the reservation interval date.
As an example, fig. 3 is a flowchart of a retention policy according to an embodiment of the present application, and fig. 4 is a related code schematic according to an embodiment of the present application. As shown in fig. 3, the flow of running the save policy is started, that is, the current backup file is transferred into the storage list according to the code in fig. 4, then the damaged file is searched for according to the file MD5, and the damaged file is added to the file delete list, thereby deleting the damaged file.
Optionally, the expiration file may be searched according to a preset expiration rule, and the expiration file is deleted, where the expiration rule includes: if the backup files are beyond the maximum retention days, deleting the backup files which are larger than the maximum retention days; and if no backup file exists beyond the maximum retention days, retaining the last backup.
FIG. 5 is a schematic diagram of a related code according to an embodiment of the present application, as shown in FIG. 5, when matching a retention policy, two-dimensional arrays may be generated according to a retention time period and a retention number, each array corresponds to a start date and an expiration date, an oldest good backup file may be found and marked for retention according to the arrays, and other backup files may be deleted.
Then, step S300 is performed: and generating a file retaining list according to the number sequence, and retaining the backup files according to the file retaining list.
With continued reference to FIG. 3, the integrity of the retained backup file is verified daily. The total number of the reserved storage files is greatly reduced, so that the aim of reducing the cost of remote storage management can be fulfilled.
It should be noted that in the implementation of the present application, the seed backup file is screened out according to the retention time and the retention number, and the seed backup file is added into the file retention list, so as to ensure that the seed backup file cannot be deleted in the iteration of the date, and the seed backup file is used as the basis for the subsequent file storage.
In summary, the method for retaining the backup file according to the embodiment of the application has the following advantages:
(1) The backup cost is reduced: the reservation strategy of the embodiment of the application fits the actual use scene, and can reach the target that the reservation period interval is larger as the reservation period interval is farther from the current time, thereby saving storage resources;
(2) The cost of remote storage management is reduced: the total number of reserved backup files is reduced by optimizing the reserved storage algorithm, so that the aim of reducing the remote storage management cost can be fulfilled.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment also provides a device for retaining the backup file, which is used for implementing the above embodiment and the preferred embodiment, and is not described in detail. The term "module" as used below may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 6 is a block diagram of a backup file reservation apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes a receiving module 1, a generating module 2, and a reservation module 3. The receiving module 1 is used for receiving a reservation instruction of the backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information; the generation module 2 is used for generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date; the retaining module 3 is configured to generate a file retaining list according to the number sequence, and retain the backup file according to the file retaining list.
Optionally, the device further comprises a setting module, configured to set an importance level for the backup file according to the importance of the service; and generating a reservation instruction according to the importance level, wherein the reservation duration information and the reservation quantity information carried by the reservation instruction are associated with the importance level.
Optionally, the device further comprises a searching module, configured to search for a damaged file according to the file MD5, and delete the damaged file.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the application, which may include a processor 81 and a memory 82 storing computer program instructions, as shown in fig. 7.
In particular, the processor 81 may include a Central Processing Unit (CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may comprise a hard disk drive (HARD DISK DRIVE, abbreviated HDD), floppy disk drive, solid state drive (Solid STATE DRIVE, abbreviated SSD), flash memory, optical disk, magneto-optical disk, magnetic tape, or universal serial bus (Universal Serial Bus, abbreviated USB) drive, or a combination of two or more of these. The memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 82 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (ProgrammableRead-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (ELECTRICALLY ALTERABLE READ-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be a Static Random-Access Memory (SRAM) or a dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory, FPMDRAM), an extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory, EDODRAM), a synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory, SDRAM), or the like, as appropriate.
Memory 82 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 81.
The processor 81 reads and executes the computer program instructions stored in the memory 82 to implement any of the backup file reservation methods of the above embodiments.
In some of these embodiments, the electronic device may also include a communication interface 83 and a bus 80. As shown in fig. 7, the processor 81, the memory 82, and the communication interface 83 are connected to each other through the bus 80 and perform communication with each other.
The communication interface 83 is used to enable communication between modules, devices, units and/or units in embodiments of the application. Communication port 83 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 80 includes hardware, software, or both that couple components of the electronic device to one another. Bus 80 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 80 may include a graphics acceleration interface (ACCELERATED GRAPHICS Port, abbreviated as AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) Bus, a Front Side Bus (Front Side Bus, abbreviated as FSB), a HyperTransport (abbreviated as HT) interconnect, an industry standard architecture (Industry Standard Architecture, abbreviated as ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated as MCA) Bus, a peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, abbreviated as SATA) Bus, a video electronics standards Association local (Video Electronics Standards Association Local Bus, abbreviated as VLB) Bus, or other suitable Bus, or a combination of two or more of these. Bus 80 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
In addition, in combination with the method for preserving the backup file in the above embodiment, the embodiment of the present application may be implemented by providing a computer readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method for preserving a backup file in any of the above embodiments.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (7)

1. A method for retaining a backup file, comprising:
setting an importance level for the backup file according to the service importance; generating a reservation instruction according to the importance level, wherein reservation duration information and reservation quantity information carried by the reservation instruction are associated with the importance level;
Receiving a reservation instruction of a backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information;
Generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date;
Generating a file reservation list according to the sequences, and reserving the backup files according to the file reservation list; wherein said generating a file retention list from said array comprises: screening out seed backup files according to the retention time information and the retention quantity information; and adding the seed backup file into the file retention list.
2. The method of claim 1, wherein after receiving the backup file reservation instruction, the method comprises:
And searching the damaged file according to the file MD5, and deleting the damaged file.
3. The method of claim 1, wherein after receiving the backup file reservation instruction, the method comprises:
searching the expiration file according to a preset expiration rule, and deleting the expiration file.
4. A backup file retaining apparatus, comprising:
The setting module is used for setting importance levels for the backup files according to the service importance; generating a reservation instruction according to the importance level, wherein reservation duration information and reservation quantity information carried by the reservation instruction are associated with the importance level;
the receiving module is used for receiving a reservation instruction of the backup file, wherein the reservation instruction carries reservation duration information and reservation quantity information;
The generation module is used for generating a number column according to the reserved time length information and the reserved quantity information, wherein each element in the number column is used for indicating whether to reserve the backup files of each date, and the length of the reserved interval date is positively correlated with the length of the current date;
The retaining module is used for generating a file retaining list according to the number sequence and retaining the backup files according to the file retaining list; wherein said generating a file retention list from said array comprises: screening out seed backup files according to the retention time information and the retention quantity information; and adding the seed backup file into the file retention list.
5. The apparatus of claim 4, further comprising a lookup module for locating a corrupted file based on file MD5 and deleting the corrupted file.
6. An electronic device comprising a processor and a storage medium storing a computer program, wherein the computer program when executed by the processor implements a method of retaining a backup file as claimed in any one of claims 1 to 3.
7. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements a method of retaining a backed-up file according to any one of claims 1 to 3.
CN202011552760.5A 2020-12-24 2020-12-24 Backup file retaining method and device, electronic equipment and storage medium Active CN112559254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011552760.5A CN112559254B (en) 2020-12-24 2020-12-24 Backup file retaining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011552760.5A CN112559254B (en) 2020-12-24 2020-12-24 Backup file retaining method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112559254A CN112559254A (en) 2021-03-26
CN112559254B true CN112559254B (en) 2024-08-02

Family

ID=75033656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011552760.5A Active CN112559254B (en) 2020-12-24 2020-12-24 Backup file retaining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112559254B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108070A (en) * 2011-11-10 2013-05-15 希姆通信息技术(上海)有限公司 Telephone book backup system and method thereof
CN104133741A (en) * 2014-08-01 2014-11-05 浪潮电子信息产业股份有限公司 Method for managing disk data life cycle

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8543784B1 (en) * 2007-12-31 2013-09-24 Symantec Operating Corporation Backup application coordination with storage array power saving features
US8527479B2 (en) * 2011-12-21 2013-09-03 International Business Machines Corporation Determining whether a selected backup set satisfies a retention policy
CN105119995A (en) * 2015-08-27 2015-12-02 北京恒华伟业科技股份有限公司 File cloud saving method, terminal equipment and backup server
CN105824723B (en) * 2016-03-18 2018-09-18 北京春鸿科技有限公司 The method and system that a kind of data to publicly-owned cloud storage account are backed up
CN105930233B (en) * 2016-05-19 2018-10-16 北京春鸿科技有限公司 To specifying the data of public cloud account to carry out the method and system of automated back-up respectively
CN111338844A (en) * 2020-02-14 2020-06-26 无锡华云数据技术服务有限公司 Database backup management method and electronic equipment
CN112035066B (en) * 2020-09-02 2024-10-11 中国银行股份有限公司 Log reservation time length calculation method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108070A (en) * 2011-11-10 2013-05-15 希姆通信息技术(上海)有限公司 Telephone book backup system and method thereof
CN104133741A (en) * 2014-08-01 2014-11-05 浪潮电子信息产业股份有限公司 Method for managing disk data life cycle

Also Published As

Publication number Publication date
CN112559254A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN110489405B (en) Data processing method, device and server
CN111414389B (en) Data processing method and device, electronic equipment and storage medium
CN107832062B (en) Program updating method and terminal equipment
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
CN109634989B (en) HIVE task execution engine selection method and system
CN104516828A (en) Method and device for removing caching data
CN110825953A (en) Data query method, device and equipment
CN109522305B (en) Big data deduplication method and device
CN112650449A (en) Release method and release system of cache space, electronic device and storage medium
CN112559254B (en) Backup file retaining method and device, electronic equipment and storage medium
CN115081233B (en) Flow simulation method and electronic equipment
CN116893981A (en) Memory operation method and device, storage medium and electronic device
CN111858049B (en) Resource information distribution method and device and computer equipment
CN115934354A (en) Online storage method and device
CN111274228B (en) Policy data migration storage method, system, equipment and readable storage medium
US20170090820A1 (en) Method and device for operating a many-core system
CN113760911A (en) Index difference testing method and system
CN113535338A (en) Interaction method, system, storage medium and electronic device for data access
CN109816110B (en) Scrypt algorithm workload proving method and Scrypt algorithm workload proving device
CN117707587B (en) Method, device, server and storage medium for concurrent upgrade of distributed storage clusters
CN115269270B (en) Backup merging method, device and equipment
CN112380203B (en) Data comparison method, device and storage medium
CN116578247B (en) Metadata-based data access method and system
CN113434502B (en) Heterogeneous database consistency implementation method, system, electronic equipment and storage medium
CN119847451B (en) Method and device for processing resource data, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载