CN113254266A - File backup and recovery method and system - Google Patents

File backup and recovery method and system Download PDF

Info

Publication number
CN113254266A
CN113254266A CN202110526035.9A CN202110526035A CN113254266A CN 113254266 A CN113254266 A CN 113254266A CN 202110526035 A CN202110526035 A CN 202110526035A CN 113254266 A CN113254266 A CN 113254266A
Authority
CN
China
Prior art keywords
backup
data
recovery
strategy
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110526035.9A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110526035.9A priority Critical patent/CN113254266A/en
Publication of CN113254266A publication Critical patent/CN113254266A/en
Pending legal-status Critical Current

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
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Landscapes

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

Abstract

The invention relates to the technical field of data node processing of a distributed data system, in particular to a method and a system for file backup and recovery, wherein the method for file backup comprises the following steps: receiving a backup task and a backup strategy preset by a user; the backup task comprises selected backup data, a selected backup server and a preset backup path; the backup server establishes a message connection channel to receive the backup strategy and backup data sent by the client, analyzes the backup strategy, creates a backup path, verifies the backup data and performs data backup according to the backup strategy; the recovery method comprises the following steps: receiving a recovery task and a recovery strategy preset by a user; and the backup server receives and analyzes the recovery strategy, checks the recovery data, checks the backup path, recovers the data according to the recovery strategy and pushes the recovery data to the client through the established message connection channel. The invention realizes the safe backup and the quick recovery of the data under the condition of not deploying a complex distributed file storage system environment.

Description

File backup and recovery method and system
Technical Field
The invention relates to the technical field of data node processing of a distributed data system, in particular to a method and a system for file backup and recovery.
Background
The distributed system means that the physical storage resources managed by the file system are not necessarily directly connected to the local nodes, but are connected with the nodes of the storage resources through a computer network, and the multi-node databases are combined into a large database to provide services for the outside. In practical application, due to the fact that a distributed system and storage deployment are complex, and the difference between hardware environments and network environments of different users is large, the deployment work brings great workload and instability of the system.
To meet the requirements of user data storage and backup, and to reduce deployment pressure and system risk and instability factors, providing a method and system for file backup and recovery is a problem to be changed urgently in the field.
Disclosure of Invention
The invention aims to provide a method and a system for backing up and recovering a file, which realize safe backing up and quick recovery of data under the condition of not deploying a complex distributed file storage system environment.
In order to solve the technical problems, the technical scheme of the invention is as follows: a method of file backup, the steps comprising:
step S1: receiving a backup task and a backup strategy preset by a user; the backup task comprises selected backup data, a selected backup server and a preset backup path;
step S2: sending the backup task to a client, and acquiring backup data and transmitting the backup data to a backup server by the client according to the backup task;
step S3: the backup server establishes a message connection channel to receive the backup strategy and the backup data sent by the client, analyzes the backup strategy, creates a backup path, verifies the backup data, and performs data backup according to the backup strategy.
According to the above scheme, in step S2, if it is determined that the data specified for backup in the backup policy is block storage, the client creates a storage block according to the host storage condition and mounts the storage block to the client quickly.
According to the above scheme, in step S3, the step of performing data backup is: and encrypting the backup data, creating a snapshot for backup and storing the snapshot in a backup path.
According to the scheme, the backup method comprises the following steps: STRATIS FILESYSTEM SNAPSHOT disk storage technology is used; when data is backed up, old backup data is still reserved, a snapshot of historical backup data is provided, when new data is written, a block containing the old data is reserved, a snapshot version of the reserved file system is provided, when the data is backed up, because the historical data exists, only incremental data needs to be backed up, the snapshot is established very quickly, and then the data is quickly restored according to a restoration strategy, so that a large amount of time is saved in the process.
According to the scheme, the backup strategy comprises the following steps: the selected backup time, the selected communication protocol and the set backup frequency.
According to the scheme, the backup strategy comprises two backup mechanisms, namely a primary backup mechanism and a timing backup mechanism, wherein the primary backup mechanism is freely set for a user; the timing backup mechanism refers to that the designated data is backed up regularly according to the backup frequency designated by the user.
The invention provides a method for recovering a backup file, which comprises the following steps:
step H1: receiving a recovery task and a recovery strategy preset by a user; the recovery task comprises selecting recovery data and selecting a recovery directory of the client;
step H2: and the backup server receives and analyzes the recovery strategy, checks the recovery data, checks the backup path, recovers the data according to the recovery strategy and pushes the recovery data to the client through the established message connection channel.
According to the scheme, the data recovery method comprises the step of decrypting the recovered data.
The invention provides a system for backing up and recovering files, which comprises: a client, a backup server and a management platform;
the management platform is used for setting a backup task and a backup strategy by a user; the method is used for setting a recovery task and a recovery strategy by a user; the user interacts with the management platform through a browser on the client;
the client is used for receiving the backup task, acquiring backup data according to the backup task and sending the backup data to the backup server; the backup server is used for receiving the recovery data sent by the backup server;
the backup server comprises a transmission module and a storage module;
the transmission module is used for establishing a message connection channel for information transmission; the backup strategy and the backup data sent by the client are received; for receiving a recovery policy and sending recovery data to the client;
the storage module is used for analyzing the backup strategy, creating a backup path, checking backup data and backing up the data according to the backup strategy; the method is used for analyzing the recovery strategy, checking the recovery data and checking the backup path, and performing data recovery according to the recovery strategy.
The invention has the following beneficial effects:
the method comprises the steps that firstly, according to a backup strategy configured by a user, a message connection channel is automatically established to receive and respond to the backup strategy, and then data backup is completed after the backup strategy is analyzed; according to the backup strategy, STRATIS FILESYSTEM SNAPSHOT disk storage technology is used, when data is backed up, old backup data is still reserved, a SNAPSHOT of historical backup data which can be referred to is provided, when new data is written, blocks containing the old data are reserved, a SNAPSHOT version of a file system which can be reserved is provided, when the data is backed up, due to the fact that the historical data already exist, only incremental data needs to be backed up, creation of the SNAPSHOT is very fast, then fast recovery of the data is conducted according to a recovery strategy, and a large amount of time is saved in the process.
The invention also provides a timing backup mechanism, the user only needs to turn on the timing backup switch, the system automatically and periodically performs data backup after selecting backup frequency (day and week), and the user can turn off or turn on the timing backup switch at any time, thus really achieving the autonomy and real-time of user operation, ensuring the safety of user data and greatly facilitating the data backup requirement of the user under extreme emergency.
Drawings
FIG. 1 is a flowchart illustrating a file backup process according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of file recovery according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, the present invention provides a method for backing up a file, which includes the steps of:
step S1: receiving a backup task and a backup strategy preset by a user; in this embodiment, the step further receives authentication information of the user and performs authentication;
the backup task comprises selected backup data, a selected backup server and a preset backup path;
the backup strategy comprises the selected backup time, the selected communication protocol and the set backup frequency;
and for remote backup, a user only needs to input the IP address, the connection port and the SSH connection parameters of the remote backup server, so that the data of the local client can be backed up to the appointed remote backup server in real time to realize cloud backup.
The backup strategy comprises two backup mechanisms, namely a primary backup mechanism and a timing backup mechanism, wherein the primary backup mechanism freely sets backup time for a user; the timing backup mechanism refers to that according to the backup frequency specified by a user, the file data under the specified backup catalog is regularly and safely backed up, and the integrity and the safety of the data are ensured. The user only needs to turn on the timing backup switch, and automatically and periodically performs data backup after selecting the backup frequency (according to day and week), and the user can turn off or turn on the timing backup switch at any time, so that the autonomy and the real-time performance of user operation are really realized.
Step S2: sending the backup task to a client, and acquiring backup data and transmitting the backup data to a backup server by the client according to the backup task; further, receiving backup data, data types and corresponding backup strategies, and if the backup data specified in the backup strategies are judged to be block storage, creating a storage block by the client according to the storage condition of the host and quickly mounting the storage block to the client;
step S3: the backup server establishes a message connection channel to receive the backup strategy and backup data sent by the client, analyzes the backup strategy and creates a backup path, checks whether the backup path is legal and effective, verifies the backup data and backs up the data according to the backup strategy; the method for backing up data comprises the following steps: encrypting the backup data, creating a snapshot for backup, storing the snapshot in a backup path, and ending the backup, wherein the encryption method adopts an SHC + AES symmetric encryption technology, so that the security and the reliability of the file data are ensured; STRATIS FILESYSTEM SNAPSHOT disk storage technology is used for backup, when data is backed up, old backup data is still reserved, a SNAPSHOT of historical backup data is provided, when new data is written, blocks containing the old data are reserved, a SNAPSHOT version of a reserved file system is provided, when data is backed up, due to the fact that the historical data exists, only incremental data needs to be backed up, creation of the SNAPSHOT is very fast, data is quickly restored according to a restoration strategy, and a large amount of time is saved in the process; a snapshot node is generated after each backup is completed and is used for quickly restoring data for use;
when the backup strategy is analyzed and the backup path is created, the best matching backup path is selected for data backup according to the running condition of the current machine, and the storage space is reasonably allocated; if the space where the target backup path designated by the user is located is insufficient, the optimal backup path and the optimal backup strategy are preferentially searched (for example, through hash distributed storage), and the user is notified of the operation result after the task is completed.
When the backup data is checked, whether the data volume during backup exceeds expectation is detected, and a capacity expansion pool filesystem snapshot file system is carried out.
Referring to fig. 2, the present invention provides a method for restoring a backup file, which includes the steps of:
step H1: receiving a recovery task and a recovery strategy preset by a user; the recovery task comprises selecting recovery data and selecting a recovery directory of the client; in the embodiment, a historical backup record is selected from a backup data list, a record to be restored is selected according to the historical backup data, and a data storage volume to be restored is obtained according to the record; the recovery strategy comprises selecting a data transmission protocol;
step H2: the backup server receives and analyzes the recovery strategy, checks the recovery data and checks the backup path, recovers the data according to the recovery strategy and pushes the recovery data to the client through the established message connection channel; the data storage volume mapped to the recovery client is mounted on the recovery client, the data mounted in the data storage volume is recovered to a specified recovery directory, and a user can check the recovery directory to detect whether the data is recovered successfully; the data recovery comprises a step of decrypting the recovered data, and the decryption method corresponds to the encryption method during the data backup.
The embodiment can carry out one-key recovery on the backup data of the user; the user can carry out incremental or full recovery on the data backed up in any time period, so that the user can check and use the file at any time, and the security of the file system of the user machine is further reinforced.
In the embodiment, a user starts a recovery task of backup data recovery by browsing a historical backup record and recovering by one key, and a client receives the recovery task of a recovery file through a message connection channel established during backup, automatically searches for the backup record after decryption, analysis, protocol authentication and authorization authentication, starts concurrent operation of multi-thread tasks when the recovered data exceeds a certain size and quantity, quickly recovers the data within the shortest time, and ensures the integrity and safety of data recovery while achieving better user experience.
The FILESYSTEM SNAPSHOT copy-on-write technology is adopted during backup, and a snapshot node is generated after each backup is completed and is used for quickly restoring data; when data is backed up, because historical data exists, only incremental data needs to be backed up, snapshot creation is very fast, and then data is quickly restored in real time according to a restoration strategy, so that a great amount of time is saved in the process.
The invention also provides a system for backing up and recovering files, which comprises: a client, a backup server and a management platform;
the management platform is used for setting a backup task and a backup strategy by a user; the method is used for setting a recovery task and a recovery strategy by a user; the user interacts with the management platform through a browser on the client and is used for user identity authentication;
the client is used for receiving the backup task, acquiring backup data according to the backup task and sending the backup data to the backup server; the backup server is used for receiving the recovery data sent by the backup server;
the backup server comprises a transmission module and a storage module;
the transmission module is used for establishing a message connection channel for information transmission; the backup strategy and the backup data sent by the client are received; for receiving a recovery policy and sending recovery data to the client;
the storage module is used for analyzing the backup strategy, creating a backup path, checking backup data and backing up the data according to the backup strategy; the method is used for analyzing the recovery strategy, checking the recovery data and checking the backup path, and performing data recovery according to the recovery strategy.
In the embodiment, when data is backed up, a user sets a backup task and a backup strategy after the identity of a management platform is verified, and a client receives the backup task, acquires backup data according to the backup task and sends the backup data to a backup server; the transmission module of the backup server establishes a message connection channel to receive and respond to the backup strategy, a backup path is created after the backup strategy is analyzed by the storage module, backup data is verified, data backup is carried out according to the backup strategy, during backup, the storage module can select the best matched backup path to carry out data backup according to the running condition of the current backup server, data processing is carried out by adopting a multi-thread task, a snapshot is detected, data are immediately backed up based on the snapshot, the data backup task is rapidly completed, and the result is timely responded to a user.
When data is recovered, a user sets a recovery task and a recovery strategy after the identity of the management platform is verified, a transmission module of the backup server receives the recovery strategy, a storage module analyzes the recovery strategy, the recovery data is verified and a backup path is checked, data recovery is carried out according to the recovery strategy, the transmission module sends the recovery data to the client, and the client receives the recovery data sent by the backup server to complete the data recovery.
The embodiment is based on a mainstream Linux system and Windows servers, such as debian/ubuntu of the deb series or redhatt/centros of the rpm series and microsoft Windows2008, and is developed using Java + Python development language.
The parts not involved in the present invention are the same as or implemented using the prior art.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (9)

1. A method of file backup, characterized by: the method comprises the following steps:
step S1: receiving a backup task and a backup strategy preset by a user; the backup task comprises selected backup data, a selected backup server and a preset backup path;
step S2: sending the backup task to a client, and acquiring backup data and transmitting the backup data to a backup server by the client according to the backup task;
step S3: the backup server establishes a message connection channel to receive the backup strategy and the backup data sent by the client, analyzes the backup strategy, creates a backup path, verifies the backup data, and performs data backup according to the backup strategy.
2. The method of file backup according to claim 1, wherein: in step S2, if it is determined that the data specified for backup in the backup policy is block storage, the client creates a storage block according to the host storage condition and mounts the storage block to the client quickly.
3. The method of file backup according to claim 1, wherein: in step S3, the step of performing data backup includes: and encrypting the backup data, creating a snapshot for backup and storing the snapshot in a backup path.
4. The method of file backup according to claim 3, wherein: the backup method comprises the following steps: STRATIS FILESYSTEM SNAPSHOT disk storage technology is used.
5. The method of file backup according to claim 1, wherein: the backup strategy comprises the following steps: the selected backup time, the selected communication protocol and the set backup frequency.
6. The method of file backup according to claim 5, wherein: the backup strategy comprises two backup mechanisms, namely a primary backup mechanism and a timing backup mechanism, wherein the primary backup mechanism is freely set for a user; the timing backup mechanism refers to that the designated data is backed up regularly according to the backup frequency designated by the user.
7. A method for backup file recovery, comprising: the method comprises the following steps:
step H1: receiving a recovery task and a recovery strategy preset by a user; the recovery task comprises selecting recovery data and selecting a recovery directory of the client;
step H2: and the backup server receives and analyzes the recovery strategy, checks the recovery data, checks the backup path, recovers the data according to the recovery strategy and pushes the recovery data to the client through the established message connection channel.
8. The method for backup file recovery of claim 7, wherein: the data recovery comprises the step of decrypting the recovered data.
9. A system for file backup and restore, characterized by: the method comprises the following steps: a client, a backup server and a management platform;
the management platform is used for setting a backup task and a backup strategy by a user; the method is used for setting a recovery task and a recovery strategy by a user; the user interacts with the management platform through a browser on the client;
the client is used for receiving the backup task, acquiring backup data according to the backup task and sending the backup data to the backup server; the backup server is used for receiving the recovery data sent by the backup server;
the backup server comprises a transmission module and a storage module;
the transmission module is used for establishing a message connection channel for information transmission; the backup strategy and the backup data sent by the client are received; for receiving a recovery policy and sending recovery data to the client;
the storage module is used for analyzing the backup strategy, creating a backup path, checking backup data and backing up the data according to the backup strategy; the method is used for analyzing the recovery strategy, checking the recovery data and checking the backup path, and performing data recovery according to the recovery strategy.
CN202110526035.9A 2021-05-14 2021-05-14 File backup and recovery method and system Pending CN113254266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110526035.9A CN113254266A (en) 2021-05-14 2021-05-14 File backup and recovery method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110526035.9A CN113254266A (en) 2021-05-14 2021-05-14 File backup and recovery method and system

Publications (1)

Publication Number Publication Date
CN113254266A true CN113254266A (en) 2021-08-13

Family

ID=77181861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110526035.9A Pending CN113254266A (en) 2021-05-14 2021-05-14 File backup and recovery method and system

Country Status (1)

Country Link
CN (1) CN113254266A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306114A (en) * 2010-09-25 2012-01-04 广东电子工业研究院有限公司 Regular data backup and recovery method based on cloud storage
CN103778034A (en) * 2014-02-26 2014-05-07 广州杰赛科技股份有限公司 Cloud storage-based data backup disaster recovery method and system
US20150142745A1 (en) * 2013-11-18 2015-05-21 Actifio, Inc. Computerized methods and apparatus for incremental database backup using change tracking
CN109901952A (en) * 2019-03-06 2019-06-18 山东申启信息技术有限公司 A kind of data back up method, system and server
CN110262928A (en) * 2019-07-02 2019-09-20 南京云信达科技有限公司 A method of the fast quick-recovery Backup Data based on emergency backup system
US20200057697A1 (en) * 2017-08-07 2020-02-20 Datto, Inc. Multiclient Backup Replication Apparatuses, Methods and Systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306114A (en) * 2010-09-25 2012-01-04 广东电子工业研究院有限公司 Regular data backup and recovery method based on cloud storage
US20150142745A1 (en) * 2013-11-18 2015-05-21 Actifio, Inc. Computerized methods and apparatus for incremental database backup using change tracking
CN103778034A (en) * 2014-02-26 2014-05-07 广州杰赛科技股份有限公司 Cloud storage-based data backup disaster recovery method and system
US20200057697A1 (en) * 2017-08-07 2020-02-20 Datto, Inc. Multiclient Backup Replication Apparatuses, Methods and Systems
CN109901952A (en) * 2019-03-06 2019-06-18 山东申启信息技术有限公司 A kind of data back up method, system and server
CN110262928A (en) * 2019-07-02 2019-09-20 南京云信达科技有限公司 A method of the fast quick-recovery Backup Data based on emergency backup system

Similar Documents

Publication Publication Date Title
CN103197990B (en) Automated priority restores and relevant apparatus and method
US9912473B2 (en) Methods and computer systems with provisions for high availability of cryptographic keys
US8055937B2 (en) High availability and disaster recovery using virtualization
EP2234049B1 (en) Background service process for local collection of data in an electronic discovery system
US11086734B2 (en) Accelerated recovery after a data disaster
WO2020088533A1 (en) Disaster recovery method and apparatus for virtualization platform
CN106339278A (en) Data backup and recovery method of network file system
KR20130131362A (en) Providing transparent failover in a file system
US9513895B2 (en) Method and system for patch automation for management servers
CN103853634A (en) Disaster recovery system and disaster recovery method
CN105446831A (en) Server-Free backup method in conjunction with SAN
CN108352995B (en) SMB service fault processing method and storage device
CN110990124B (en) Cloud host recovery method and device
WO2017070480A1 (en) Synchronization storage solution after an offline event
CN116107704B (en) Block chain BaaS and multi-alliance deployment method, data storage access method and device
US9171024B1 (en) Method and apparatus for facilitating application recovery using configuration information
CN112380067A (en) Metadata-based big data backup system and method under Hadoop environment
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN109062599B (en) Management method and device for code update under micro-service architecture
CN113254266A (en) File backup and recovery method and system
CN114281600A (en) Disaster recovery backup and recovery method, device, equipment and storage medium
CN110688259B (en) Private cloud backup recovery system and backup recovery method thereof
KR20050034508A (en) File upload and healing system through network based remote storage and method thereof
US12045489B2 (en) Fast resynchronization of a mirrored aggregate using disk-level cloning
CN116627999A (en) Block chain data processing method and device, electronic 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