CN116361071A - Backup file generation method, device, equipment and storage medium - Google Patents

Backup file generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116361071A
CN116361071A CN202310345048.5A CN202310345048A CN116361071A CN 116361071 A CN116361071 A CN 116361071A CN 202310345048 A CN202310345048 A CN 202310345048A CN 116361071 A CN116361071 A CN 116361071A
Authority
CN
China
Prior art keywords
file
instruction message
backup
user
backup file
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.)
Granted
Application number
CN202310345048.5A
Other languages
Chinese (zh)
Other versions
CN116361071B (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.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads 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 Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202310345048.5A priority Critical patent/CN116361071B/en
Publication of CN116361071A publication Critical patent/CN116361071A/en
Application granted granted Critical
Publication of CN116361071B publication Critical patent/CN116361071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Landscapes

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

Abstract

The application provides a backup file generation method, a device, equipment and a storage medium, and relates to the technical field of file processing. The method includes the steps of responding to a first instruction message of a user, generating file directory information in a preset storage position according to the first instruction message, generating a file path according to the file directory information and the position information of the preset storage position after generating the file directory information, and finally responding to a second instruction message of the user, the file path and a first original file to generate a first backup file. By adopting the technical scheme, the purpose of locally backing up the files can be realized, the backed up files are easy to search, and the working efficiency is further improved.

Description

Backup file generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of file processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a backup file.
Background
During the chip design and verification process, a programmer is required to edit some texts, but the situation that the programmer deletes local texts by mistake and causes larger loss often occurs. To solve this problem, a common method is to configure a redundant server array, so that automatic backup of text can be realized, and the method is generally applied to integral backup of large-scale server data. To prevent false drop problems, corresponding to the programmer individual, version management tools are typically used to save text, for example by uploading the text to a git library or a svn version library. However, the version library is mainly used for solving the version management problem, and for the problem of misprinting local text, if the version library is not uploaded in time before misprinting, the version library is also at risk of losing.
Therefore, a method for generating backup files is needed to achieve the purpose of locally backing up files, and the backup files are easy to find, so that the working efficiency is improved.
Disclosure of Invention
The application provides a backup file generation method, device, equipment and storage medium, which can realize the purpose of locally backing up files, and the backed up files are easy to search, so that the working efficiency is improved.
In a first aspect, the present application provides a backup file generating method, including:
responding to a first instruction message of a user, and generating file directory information in a preset storage position according to the first instruction message; the first instruction message is used for indicating to generate the file directory information; wherein the file directory information characterizes attribute information of the stored files;
generating a file path according to the file directory information and the position information of the preset storage position;
generating a first backup file in response to a second instruction message of a user, the file path and the first original file; wherein the second instruction message is used for indicating that the first backup file is generated.
In one example, the generating the first backup file in response to the second instruction message of the user, the file path, and the first original file includes:
responding to a second instruction message of a user, and acquiring a first file name of the first original file;
generating the first backup file in the file path; wherein the second file name of the first backup file is the same as the first file name of the first original file.
In one example, before the generating the first backup file, the method further includes:
if the file path does not exist, a new file path is determined or generated.
In one example, the method further comprises:
responding to a third instruction message of the user, the file path and the second original file to generate a second backup file; wherein the third file name of the second backup file is the same as the first file name;
and if the first backup file exists in the file path and the second file name is the same as the third file name, replacing the second backup file with the first backup file.
In one example, the file directory information of the first backup file and the second backup file are the same and the file directory information is set by a user.
In one example, the attribute information of the stored file includes time information and/or function information.
In one example, if the attribute information is time information, the accuracy of the time information is graded by different particle sizes.
In one example, the method further comprises:
and responding to a fourth instruction message of the user, and restoring the first backup file to the original storage position.
In one example, the second instruction message of the user is different in the instruction messages in different preset operating systems.
In one example, the program corresponding to the method is encapsulated in a function so as to be invoked in a preset operating system.
In one example, before the responding to the first instruction message of the user, the method further comprises:
traversing the database, and taking a storage library meeting preset time and preset capacity in the database as the preset storage position.
In a second aspect, the present application provides a backup file generating apparatus, including:
the first generation unit is used for responding to a first instruction message of a user and generating file directory information in a preset storage position according to the first instruction message; the first instruction message is used for indicating to generate the file directory information; wherein the file directory information characterizes attribute information of the stored files;
the second generation unit is used for generating a file path according to the file directory information and the position information of the preset storage position;
a third generating unit, configured to generate a first backup file in response to a second instruction message of a user, the file path, and the first original file; wherein the second instruction message is used for indicating that the first backup file is generated.
In one example, the third generating unit includes:
the acquisition module is used for responding to a second instruction message of a user and acquiring a first file name of the first original file;
a generating module, configured to generate the first backup file in the file path; wherein the second file name of the first backup file is the same as the first file name of the first original file.
In one example, the apparatus further comprises:
and the determining unit is used for determining or generating a new file path if the file path does not exist.
In one example, the apparatus further comprises:
a fourth generating unit, configured to generate a second backup file in response to a third instruction message of the user, the file path, and the second original file; wherein the third file name of the second backup file is the same as the first file name;
and the replacing unit is used for replacing the second backup file with the first backup file if the first backup file exists in the file path and the second file name is the same as the third file name.
In one example, the file directory information of the first backup file and the second backup file are the same and the file directory information is set by a user.
In one example, the attribute information of the stored file includes time information and/or function information.
In one example, if the attribute information is time information, the accuracy of the time information is graded by different particle sizes.
In one example, the apparatus further comprises:
and the restoring unit is used for responding to a fourth instruction message of the user and restoring the first backup file to the original storage position.
In one example, the second instruction message of the user is different in the instruction messages in different preset operating systems.
In one example, the program corresponding to the method is encapsulated in a function so as to be invoked in a preset operating system.
In one example, the apparatus further comprises:
the traversing unit is used for traversing the database and taking a storage library meeting preset time and preset capacity in the database as the preset storage position.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
According to the backup file generation method, device and equipment and storage medium, file directory information is generated in a preset storage position according to a first instruction message of a user, a file path is generated according to the file directory information and position information of the preset storage position after the file directory information is generated, and finally a first backup file is generated according to a second instruction message of the user, the file path and a first original file. By adopting the technical scheme, the purpose of locally backing up the files can be realized, the backed up files are easy to search, and the working efficiency is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flowchart of a backup file generation method according to a first embodiment of the present application;
FIG. 2 is a flowchart of a backup file generation method according to a second embodiment of the present application;
FIG. 3 is a schematic structural diagram of a backup file generating apparatus according to a third embodiment of the present application;
FIG. 4 is a schematic structural diagram of a backup file generating apparatus according to a fourth embodiment of the present application;
fig. 5 is a block diagram of an electronic device, according to an example embodiment.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Currently, if there is one file a to be backed up, the file a may be copied into a plurality of different files through a command message. For example: file a becomes file A1, file a becomes file A2, and file a becomes file A3. However, each time the file a is copied as another file, a change in the file name occurs, and when the file is restored, the changed file name needs to be modified, which causes unnecessary workload to the user. Moreover, when the file A is copied into other files, if the storage position is not specified, the copied other files and the first original file are stored in the same storage position, the backed-up files also have no corresponding time information, and the files are not easy to search when the user recovers.
The backup file generation method aims at solving the technical problems in the prior art.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a backup file generation method according to an embodiment of the present application. The first embodiment comprises the following steps:
s101, responding to a first instruction message of a user, and generating file directory information in a preset storage position according to the first instruction message.
In one example, the first instruction message is to instruct generation of file directory information; wherein the file directory information characterizes attribute information of the stored files. In this embodiment, the first instruction message of the user includes attribute information of the file stored in the file directory information, where the attribute information may be time information and/or function information. If the first instruction message is in the linux environment operating system, the first instruction message can be date+%F, the current time in the linux environment operating system is obtained, and file directory information is generated in a preset storage position according to the current time.
In one example, if the attribute information is time information, the accuracy of the time information is graded by different particle sizes. Specifically, the granularity of the time information may be year-month-day, or year-month-day-time-minute-second, which is not limited herein. In this embodiment, if naming is performed in year-month-day format, the generated file directory information may be 2023-03-14. In this embodiment, the first instruction message may be a naming message, and the generated file directory information may be item a, which indicates that the file directory information is a file related to item a. Further, the file directory information may be stored in a preset program variable, for example, in the linux environment operating system may be stored in $temp_dir_name.
S102, generating a file path according to the file directory information and the position information of the preset storage position.
In this embodiment, the file path is an index for storing and searching the file, and is composed of the position information of the preset storage position and the file directory information. For example, the file path may be A-a-2023-03-14, where A-a is location information of a preset storage location and 2023-03-14 is file directory information.
S103, responding to a second instruction message, a file path and a first original file of a user, and generating a first backup file; wherein the second instruction message is used for indicating that the first backup file is generated.
In this embodiment, the first backup file is a duplicate file of the first original file, and the content of the first backup file is the same as the content of the first original file. The second instruction message of the user is used to generate the first backup file in the specified file path, for example, the second instruction message of the user may be a cp instruction message in the linux environment operating system.
According to the backup file generation method, file directory information is generated in a preset storage position according to a first instruction message of a user, a file path is generated according to the file directory information and the position information of the preset storage position after the file directory information is generated, and finally a first backup file is generated according to a second instruction message of the user, the file path and a first original file. By adopting the technical scheme, the purpose of locally backing up the files can be realized, the backed up files are easy to search, and the working efficiency is further improved.
Fig. 2 is a flowchart of a backup file generation method according to a second embodiment of the present application. The second embodiment includes the following steps:
s201, traversing the database, and taking a storage library meeting preset time and preset capacity in the database as a preset storage position.
In this embodiment, the preset time means that the storage repository is always available in the time period, and the preset capacity means that the storage capacity can be satisfied to store a preset number of files, for example, the preset capacity may be 1G or more. For example, the preset storage location may be scratch/code_backup, where the reason for selecting/scratch disk is that the disk space is larger and more files can be accommodated.
S202, responding to a first instruction message of a user, and generating file directory information in a preset storage position according to the first instruction message; the first instruction message is used for indicating to generate file directory information; wherein the file directory information characterizes attribute information of the stored files.
For example, this step may refer to step S101, and will not be described in detail.
S203, generating a file path according to the file directory information and the position information of the preset storage position.
For example, this step may refer to step S102, and will not be described in detail.
S204, responding to a second instruction message of a user, and acquiring a first file name of a first original file; wherein the second instruction message is used for indicating that the first backup file is generated.
In this embodiment, after receiving the second instruction message of the user, the first original file is determined from the files selected in the preset, and the first file name of the first original file is obtained, for example, the first file name may be a.
In one example, the second instruction message of the user is different in the instruction messages in different preset operating systems.
Specifically, if under the window environment operating system, the second instruction message of the user may be an mv command, where the mv command characterizes that the first original file is moved under the file path, and the first backup file is generated.
S205, generating a first backup file in a file path; wherein the second file name of the first backup file is the same as the first file name of the first original file.
In this embodiment, after the first backup file is generated in the file path, the second file name of the second backup file is also a. The advantage of this is that the user does not need to modify the file name and can quickly find when the first backup file is used later. Specifically, if the first backup file is generated in the file path under the window environment operating system, the first original file is automatically deleted.
In one example, before generating the first backup file, further comprising:
if the file path does not exist, a new file path is determined or generated.
In this embodiment, since the first backup file is generated under the file path, it is necessary to determine whether the file path exists, and if the file path already exists, the first backup file is directly generated under the file path. If the file path does not exist, a new file path needs to be generated first. For example, it is eventually required to store under the file path A-a-2023-03-14, and it is first checked whether A-a-2023-03-14 exists, and if not, the file path A-a-2023-03-14 is established.
S206, responding to the third instruction message, the file path and the second original file of the user, and generating a second backup file; wherein the third file name of the second backup file is the same as the first file name.
In this embodiment, the third instruction message of the user is also an instruction message for generating the backup file. In this embodiment, the process of generating the second backup file is the same as the process of generating the first backup file, and will not be described here again.
S207, if the first backup file exists in the file path and the second file name is the same as the third file name, the second backup file is replaced by the first backup file.
In this embodiment, if the third file name of the second backup file is the same as the second file name of the first backup file, it is indicated that the second backup file is an updated file, and therefore, the first backup file may be replaced by the second backup file.
In one example, the file directory information of the first backup file and the second backup file are the same and the file directory information is set by a user.
In this embodiment, if the file directory information of the first backup file is the same as the file directory information of the second backup file, the second backup file may be replaced by the first backup file, that is, the second backup file and the second backup file are duplicate files of the same file and are duplicate with the same time information or duplicate with the same function information. For example, the same time information may be 2023-03-31, and the first backup file and the second backup file are generated in 2023-03-31, and the file names of the two files are the same, and the back backup file may be replaced by the front backup file. This has the advantage of reducing the memory occupancy as much as possible.
S208, responding to a fourth instruction message of the user, and restoring the first backup file to the original storage position.
In this embodiment, the fourth instruction message of the user is a message for reclaiming the first backup file. For example, in the operating system of the window environment, after receiving the fourth instruction message of the user, the usage environment of the embodiment may restore the first backup file at the recycle bin to the original storage location, where the original storage location is the location where the first original file is located, and further, the fourth instruction message of the user may be an mv command. In this embodiment, the file path of the first backup file in the recycle bin may refer to step S201-step S203, which is not described herein. In one example, the program corresponding to the method is encapsulated in a function so as to be invoked in a preset operating system. In this embodiment, the preset operating system may be a window environment operating system or a linux environment operating system.
According to the backup file generation method, a database is traversed, a storage library meeting preset time and preset capacity in the database is used as a preset storage position, file directory information is generated in the preset storage position according to first instruction information in response to first instruction information of a user, a file path is generated according to the file directory information and the position information of the preset storage position, a first file name of a first original file is acquired in response to second instruction information of the user, the first backup file is generated in the file path, and the first backup file is restored to the original storage position in response to fourth instruction information of the user. By adopting the technical scheme, the file is not required to be renamed by a user when being restored, the file name is not required to be changed, the restoration is convenient, and the efficiency is improved.
Fig. 3 is a schematic structural diagram of a backup file generating apparatus according to a third embodiment of the present application. Specifically, the apparatus 30 of the third embodiment includes:
a first generating unit 301, configured to generate file directory information in a preset storage location according to a first instruction message in response to a first instruction message of a user; the first instruction message is used for indicating to generate file directory information; wherein the file directory information characterizes attribute information of the stored files.
The second generating unit 302 is configured to generate a file path according to the file directory information and the location information of the preset storage location.
A third generating unit 303, configured to generate a first backup file in response to a second instruction message of the user, a file path, and an original file; wherein the second instruction message is used for indicating that the first backup file is generated.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Fig. 4 is a schematic structural diagram of a backup file generating apparatus according to a fourth embodiment of the present application. Specifically, the apparatus 40 of the fourth embodiment includes:
a first generating unit 401, configured to generate file directory information in a preset storage location according to a first instruction message in response to a first instruction message of a user; the first instruction message is used for indicating to generate file directory information; wherein the file directory information characterizes attribute information of the stored files.
The second generating unit 402 is configured to generate a file path according to the file directory information and the location information of the preset storage location.
A third generating unit 403, configured to generate a first backup file in response to a second instruction message of a user, a file path, and an original file; wherein the second instruction message is used for indicating that the first backup file is generated.
In one example, the second instruction message of the user is different in the instruction messages in different preset operating systems.
In one example, the third generating unit 403 includes:
an obtaining module 4031, configured to obtain a first file name of an original file in response to a second instruction message of a user;
a generating module 4032, configured to generate a first backup file in the file path; wherein the second file name of the first backup file is the same as the first file name of the original file.
In one example, the apparatus further comprises:
a determining unit 404, configured to determine or generate a new file path if the file path does not exist.
In one example, the apparatus further comprises:
a fourth generating unit 405, configured to generate a second backup file in response to the third instruction message, the file path, and the original file of the user; wherein the third file name of the second backup file is the same as the first file name;
the replacing unit 406 is configured to replace the second backup file with the first backup file if the first backup file exists in the file path and the second file name is the same as the third file name.
In one example, the file directory information of the first backup file and the second backup file are the same and the file directory information is set by a user.
In one example, the attribute information of the stored file includes time information and/or function information.
In one example, if the attribute information is time information, the accuracy of the time information is graded by different particle sizes.
In one example, the apparatus further comprises:
the restoring unit 407 is configured to restore the first backup file to the original storage location in response to the fourth instruction message of the user.
In one example, the apparatus further comprises:
the traversing unit 408 is configured to traverse the database, and take a storage library satisfying the preset time and the preset capacity in the database as a preset storage location.
In one example, the program corresponding to the method is encapsulated in a function so as to be invoked in a preset operating system.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Fig. 5 is a block diagram of an electronic device, which may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like, in accordance with an exemplary embodiment.
The apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the apparatus 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interactions between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on the apparatus 500, contact data, phonebook data, messages, pictures, videos, and the like. The memory 504 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 500.
The multimedia component 508 includes a screen between the device 500 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 500 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further comprises a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 514 includes one or more sensors for providing status assessment of various aspects of the apparatus 500. For example, the sensor assembly 514 may detect the on/off state of the device 500, the relative positioning of the components, such as the display and keypad of the device 500, the sensor assembly 514 may also detect a change in position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration/deceleration of the device 500, and a change in temperature of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 504, including instructions executable by processor 520 of apparatus 500 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method of backup file generation for the electronic device.
The application also discloses a computer program product comprising a computer program which, when executed by a processor, implements a method as described in the present embodiment.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or electronic device.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data electronic device), or that includes a middleware component (e.g., an application electronic device), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship of client and electronic devices arises by virtue of computer programs running on the respective computers and having a client-electronic device relationship to each other. The electronic equipment can be cloud electronic equipment, also called cloud computing electronic equipment or cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service (Virtual Private Server or VPS for short) are overcome. The electronic device may also be an electronic device of a distributed system or an electronic device that incorporates a blockchain. It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A method for generating a backup file, the method comprising:
responding to a first instruction message of a user, and generating file directory information in a preset storage position according to the first instruction message; the first instruction message is used for indicating to generate the file directory information; wherein the file directory information characterizes attribute information of the stored files;
generating a file path according to the file directory information and the position information of the preset storage position;
generating a first backup file in response to a second instruction message of a user, the file path and the first original file; wherein the second instruction message is used for indicating that the first backup file is generated.
2. The method of claim 1, wherein generating the first backup file in response to the second instruction message, the file path, and the first original file of the user comprises:
responding to a second instruction message of a user, and acquiring a first file name of the first original file;
generating the first backup file in the file path; wherein the second file name of the first backup file is the same as the first file name of the first original file.
3. The method of claim 2, further comprising, prior to said generating said first backup file:
if the file path does not exist, a new file path is determined or generated.
4. The method according to claim 2, wherein the method further comprises:
responding to a third instruction message of the user, the file path and the second original file to generate a second backup file; wherein the third file name of the second backup file is the same as the first file name;
and if the first backup file exists in the file path and the second file name is the same as the third file name, replacing the second backup file with the first backup file.
5. The method of claim 4, wherein the file directory information of the first backup file and the second backup file are the same and the file directory information is set by a user.
6. The method according to claim 1, wherein the attribute information of the stored file includes time information and/or function information.
7. The method of claim 6, wherein if the attribute information is time information, the accuracy of the time information is classified according to different granularity.
8. The method according to claim 1, wherein the method further comprises:
and responding to a fourth instruction message of the user, and restoring the first backup file to the original storage position.
9. The method of claim 1, wherein the second command message of the user is different in command messages in different preset operating systems.
10. The method according to any one of claims 1-9, wherein a program corresponding to the method is encapsulated in a function to be invoked in a preset operating system.
11. The method of claim 1, wherein prior to said responding to the first instruction message of the user, the method further comprises:
traversing the database, and taking a storage library meeting preset time and preset capacity in the database as the preset storage position.
12. A backup file generation apparatus, the apparatus comprising:
the first generation unit is used for responding to a first instruction message of a user and generating file directory information in a preset storage position according to the first instruction message; the first instruction message is used for indicating to generate the file directory information; wherein the file directory information characterizes attribute information of the stored files;
the second generation unit is used for generating a file path according to the file directory information and the position information of the preset storage position;
a third generating unit, configured to generate a first backup file in response to a second instruction message of a user, the file path, and the first original file; wherein the second instruction message is used for indicating that the first backup file is generated.
13. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-11.
14. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-11.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-11.
CN202310345048.5A 2023-03-31 2023-03-31 Backup file generation method, device, equipment and storage medium Active CN116361071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310345048.5A CN116361071B (en) 2023-03-31 2023-03-31 Backup file generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310345048.5A CN116361071B (en) 2023-03-31 2023-03-31 Backup file generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116361071A true CN116361071A (en) 2023-06-30
CN116361071B CN116361071B (en) 2024-04-05

Family

ID=86936949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310345048.5A Active CN116361071B (en) 2023-03-31 2023-03-31 Backup file generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116361071B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236797A1 (en) * 2003-03-28 2004-11-25 Hitachi, Ltd. Support system for data migration
US20090063508A1 (en) * 2007-08-27 2009-03-05 Nec Corporation Computer, system, storage and access control method, and access control method
US20090249005A1 (en) * 2008-03-27 2009-10-01 International Business Machines Corporation System and method for providing a backup/restore interface for third party hsm clients
CN103365996A (en) * 2013-07-12 2013-10-23 北京奇虎科技有限公司 File management and processing method, device and system
CN104301382A (en) * 2014-09-03 2015-01-21 惠州Tcl移动通信有限公司 Cloud data backup and recovery method
CN104714859A (en) * 2013-12-17 2015-06-17 南京壹进制信息技术有限公司 Rapid backup and recovery method of mass files
CN107016099A (en) * 2017-04-10 2017-08-04 国家电网公司 The folder space monitoring maintenance system and method for class Unix system server
CN110059061A (en) * 2019-03-22 2019-07-26 厦门快商通信息咨询有限公司 The backup method and back-up device and storage medium of a kind of voice print database
US20200142781A1 (en) * 2017-08-29 2020-05-07 Ho Jun Lee Real time file alteration sensing-based automatic backup device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236797A1 (en) * 2003-03-28 2004-11-25 Hitachi, Ltd. Support system for data migration
US20090063508A1 (en) * 2007-08-27 2009-03-05 Nec Corporation Computer, system, storage and access control method, and access control method
US20090249005A1 (en) * 2008-03-27 2009-10-01 International Business Machines Corporation System and method for providing a backup/restore interface for third party hsm clients
CN103365996A (en) * 2013-07-12 2013-10-23 北京奇虎科技有限公司 File management and processing method, device and system
CN104714859A (en) * 2013-12-17 2015-06-17 南京壹进制信息技术有限公司 Rapid backup and recovery method of mass files
CN104301382A (en) * 2014-09-03 2015-01-21 惠州Tcl移动通信有限公司 Cloud data backup and recovery method
CN107016099A (en) * 2017-04-10 2017-08-04 国家电网公司 The folder space monitoring maintenance system and method for class Unix system server
US20200142781A1 (en) * 2017-08-29 2020-05-07 Ho Jun Lee Real time file alteration sensing-based automatic backup device
CN110059061A (en) * 2019-03-22 2019-07-26 厦门快商通信息咨询有限公司 The backup method and back-up device and storage medium of a kind of voice print database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LUCIAN-FLORENTIN BARBULESCU等: "A simple files backup component for a Flight Dynamics System", 《2022 23RD INTERNATIONAL CARPATHIAN CONTROL CONFERENCE (ICCC)》, 27 June 2022 (2022-06-27), pages 25 - 30 *
胡平平等: "快速文件备份软件的设计和实现", 《计算机工程与设计》, 16 November 2015 (2015-11-16), pages 2979 - 2984 *

Also Published As

Publication number Publication date
CN116361071B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN106991018B (en) Interface skin changing method and device
EP2950486B1 (en) Method and device for managing instant message
CN111258952B (en) Data storage control method, device and storage medium
CN111767006B (en) Data processing method and device
CN116361071B (en) Backup file generation method, device, equipment and storage medium
CN111290882B (en) Data file backup method, data file backup device and electronic equipment
CN114546992A (en) Database migration method and device, storage medium and electronic equipment
EP3185515A1 (en) Method and device for inputting information
CN111241134B (en) Data processing method and device
CN112988822A (en) Data query method, device, equipment, readable storage medium and product
CN112988663A (en) File storage method and electronic equipment
CN112328141A (en) Copying method and device
CN111625251B (en) Method and device for processing application instance
CN111159148B (en) Configuration information state management method and device, electronic equipment and storage medium
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN114020504B (en) Data processing method and device, electronic equipment and storage medium
CN114528037B (en) Application starting method and device, electronic equipment and storage medium
CN111274210B (en) Metadata processing method and device and electronic equipment
CN116009946A (en) Git-based code statistics method and device
CN114661487A (en) Data processing method and device, electronic equipment and storage medium
CN115794771A (en) Document information generation method, device, equipment and storage medium
CN114115862A (en) Data processing method and device, electronic equipment and storage medium
CN117472931A (en) Method, device, equipment and storage medium for calling database execution statement
CN114329088A (en) Directory structure file generation method, device, equipment and storage medium
CN116755694A (en) Page information display method, device, equipment and storage medium

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