CN113986851A - File synchronization method, system and storage medium - Google Patents

File synchronization method, system and storage medium Download PDF

Info

Publication number
CN113986851A
CN113986851A CN202111265134.2A CN202111265134A CN113986851A CN 113986851 A CN113986851 A CN 113986851A CN 202111265134 A CN202111265134 A CN 202111265134A CN 113986851 A CN113986851 A CN 113986851A
Authority
CN
China
Prior art keywords
file
cloud
synchronized
server
environment
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
CN202111265134.2A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202111265134.2A priority Critical patent/CN113986851A/en
Publication of CN113986851A publication Critical patent/CN113986851A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • 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/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • 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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention relates to the technical field of data synchronization, in particular to a file synchronization method, a file synchronization system and a storage medium. The method comprises the following steps: when a public cloud testing server deployed in a public cloud environment detects a file to be synchronized, synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment; after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in a cloud desktop environment; after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment; after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in a private cloud environment. The technical scheme of the embodiment of the invention can realize the automatic synchronization of the files to be synchronized under different network environments.

Description

File synchronization method, system and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data synchronization, in particular to a file synchronization method, a file synchronization system and a storage medium.
Background
Confidentiality and security are very important for banks, so that the management and control of the testing environment inside the bank are strict, and the network environments in the testing environments are mutually isolated.
At present, after a development tester updates a file in one network environment, the development tester needs to manually switch to a different network environment to manually upload and/or download the file, so as to ensure file synchronization in the different network environments.
However, the existing scheme for synchronizing files in various network environments has the problems of low efficiency and high error rate.
Disclosure of Invention
The embodiment of the invention provides a file synchronization method, a file synchronization system and a storage medium, which are used for achieving the effect of automatic file synchronization under different network environments.
In a first aspect, an embodiment of the present invention provides a file synchronization method, which may include:
when a public cloud test server deployed in a public cloud environment detects a file to be synchronized, synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment;
after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in a cloud desktop environment;
after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment;
after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in a private cloud environment.
In a second aspect, an embodiment of the present invention further provides a file synchronization system, which may include: the cloud desktop file service terminal is deployed in the cloud desktop environment, the private cloud synchronization service terminal is deployed in the cloud desktop environment and the private cloud environment, and the private cloud test service terminal is deployed in the private cloud environment; wherein the content of the first and second substances,
the public cloud testing server is used for synchronizing the files to be synchronized to the public cloud synchronization server when the files to be synchronized are detected; the public cloud synchronization server is used for synchronizing the file to be synchronized to the cloud desktop file server after receiving the file to be synchronized; the cloud desktop file server is used for synchronizing the file to be synchronized to the private cloud synchronization server after receiving the file to be synchronized; and the private cloud synchronization server is used for synchronizing the file to be synchronized to the private cloud test server after receiving the file to be synchronized.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the file synchronization method provided in any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer program product, where the computer program is stored on a computer, and when the computer program is executed by a processor, the computer program implements the file synchronization method provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, when the file to be synchronized is detected by the public cloud test server deployed in the public cloud environment, the file to be synchronized is synchronized to the public cloud synchronization server which is deployed in the public cloud environment and the cloud desktop environment and can communicate with the public cloud synchronization server; the public cloud synchronization server synchronizes the received file to be synchronized to a cloud desktop file server which is deployed in a cloud desktop environment and can communicate with the public cloud desktop file server; the cloud desktop file server synchronizes the received file to be synchronized to a private cloud synchronization server which is deployed in a cloud desktop environment and a private cloud environment and can communicate with the cloud desktop file server; the private cloud synchronization server synchronizes the received file to be synchronized to a private cloud test server which is deployed in the private cloud environment and can communicate with the private cloud synchronization server, so that the file to be synchronized in the public cloud environment is automatically synchronized to the private cloud environment. According to the technical scheme, the problems of low efficiency and high error rate caused by manual synchronization of the files to be synchronized in different network environments are solved, and the files to be synchronized can be automatically synchronized in a plurality of sets of network environments which are not communicated with each other, so that the effect of automatic synchronization of the files to be synchronized in other network environments after the files to be synchronized are updated in one network environment is achieved, and the high consistency of the files to be synchronized in each network environment is effectively ensured.
Drawings
FIG. 1 is a flowchart of a file synchronization method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a file synchronization method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of an alternative example of a file synchronization method in the second embodiment of the present invention;
FIG. 4 is a flowchart of a file synchronization method according to a third embodiment of the present invention;
fig. 5 is a block diagram of a file synchronization system according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a file synchronization method according to an embodiment of the present invention. The embodiment can be applied to the situation of automatically synchronizing the files under different network environments. The method can be executed by the file synchronization system provided by the embodiment of the invention, and the system can be realized by software and/or hardware.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s110, when the public cloud testing server deployed in the public cloud environment detects a file to be synchronized, synchronizing the file to be synchronized to the public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment.
The public cloud environment is one type of Test environment, and the public cloud Test server where the public cloud Test server is located may be a server deployed in the public cloud environment, such as a server deployed in a System Integration Test case (SIT) environment, a server deployed in a User Access Test (UAT) environment, and the like, which is a starting point in a file synchronization System.
The cloud desktop environment is a development environment, the development environment is a network environment different from the public cloud environment, and a public cloud synchronization server which is deployed at the junction of the public cloud environment and the cloud desktop environment and can perform file synchronization can be respectively communicated with servers deployed in the two network environments (namely file transmission).
After detecting the file to be synchronized in the public cloud testing server, the public cloud testing server may synchronize the file to be synchronized to a public cloud synchronization server that can communicate with the public cloud testing server, where the file to be synchronized may be a file to be synchronized from a public cloud environment to a private cloud environment, and may be various types of files, such as script files, character files, picture files, and the like, which are not specifically limited herein. In practical application, optionally, a development tester can upload a file to be synchronized to a public cloud testing server through a bastion machine (namely, a public cloud operating console), so that the public cloud testing server can detect the file to be synchronized in the public cloud testing server; optionally, the File to be synchronized may be synchronized to a public cloud synchronization server through a Secure File Transfer Protocol (SFTP), where the public cloud synchronization server may be an SFTP server; optionally, an sh script may be deployed on the public cloud test server, so that the public cloud test server may execute a file detection operation at regular time based on the sh script to detect whether a file to be synchronized exists.
And S120, after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in a cloud desktop environment.
The cloud desktop file server can be a server which is deployed in a cloud desktop environment and can receive and forward files, and the cloud desktop file server where the cloud desktop file server is located is a transfer of a file synchronization system. In practical applications, the cloud desktop File server may be a File Transfer Protocol (FTP) server that provides File storage and access services over the internet.
After receiving the file to be synchronized, the public cloud synchronization server can synchronize the file to be synchronized to a cloud desktop file server capable of communicating with the public cloud synchronization server. In practical applications, optionally, the synchronization process may be a timing synchronization process, such as a public cloud synchronization server synchronizing a file at preset time intervals.
S130, after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment.
Among them, the private cloud environment is one type of test environment, which is a different environment from the cloud desktop environment. The private cloud synchronization server which is deployed at the junction of the cloud desktop environment and the private cloud environment and can perform file synchronization can respectively communicate with the servers deployed in the two network environments (namely file transmission).
On the basis, after the cloud desktop file server receives the file to be synchronized, the cloud desktop file server can synchronize the file to be synchronized to the private cloud synchronization server. In practical applications, optionally, the synchronization process may be a timing synchronization process, for example, the cloud desktop file server automatically performs file synchronization at preset time intervals.
S140, after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in the private cloud environment.
The private cloud test server may be a server deployed in a private cloud environment, that is, the private cloud test server in which the private cloud test server is located may be a server deployed in the private cloud environment, such as a server deployed in an SIT, a server deployed in an UAT, a server deployed in a Virtualization Technology (VT), and the like, which are endpoints in a file synchronization system.
Because the private cloud testing server and the private cloud synchronization server can communicate with each other, after receiving the file to be synchronized, the private cloud synchronization server can synchronize the file to be synchronized to the private cloud testing server. In practical applications, optionally, an optional implementation scheme of the synchronization process is as follows: the private cloud testing server is provided with an sh script for regularly detecting whether the private cloud synchronization server has a newly added file to be synchronized, so that after the sh script detects that the newly added file to be synchronized appears on the private cloud synchronization server, the sh script can send a file acquisition request to the private cloud synchronization server so as to download the newly added file to be synchronized from the private cloud synchronization server.
It should be noted that, taking the private cloud environment as an example, at least one network environment, such as SIT, UAT, VT, etc., may be included therein, and the above is only explained in the unit of a certain network environment in the private cloud environment. In other words, the file to be synchronized can be synchronized to any network environment in the private cloud environment through the scheme. In addition, one, two or more sets of private cloud test servers which are independent from each other can be deployed in each network environment, and each set of private cloud test server can be respectively deployed with an sh script, which means that each set of private cloud test server can independently execute the scheme to acquire the file to be synchronized. The situation of the public cloud environment is similar, and details are not repeated here.
According to the technical scheme of the embodiment of the invention, when the file to be synchronized is detected by the public cloud test server deployed in the public cloud environment, the file to be synchronized is synchronized to the public cloud synchronization server which is deployed in the public cloud environment and the cloud desktop environment and can communicate with the public cloud synchronization server; the public cloud synchronization server synchronizes the received file to be synchronized to a cloud desktop file server which is deployed in a cloud desktop environment and can communicate with the public cloud desktop file server; the cloud desktop file server synchronizes the received file to be synchronized to a private cloud synchronization server which is deployed in a cloud desktop environment and a private cloud environment and can communicate with the cloud desktop file server; the private cloud synchronization server synchronizes the received file to be synchronized to a private cloud test server which is deployed in the private cloud environment and can communicate with the private cloud synchronization server, so that the file to be synchronized in the public cloud environment is automatically synchronized to the private cloud environment. According to the technical scheme, the problems of low efficiency and high error rate caused by manual synchronization of the files to be synchronized in different network environments are solved, and the files to be synchronized can be automatically synchronized in a plurality of sets of network environments which are not communicated with each other, so that the effect of automatic synchronization of the files to be synchronized in other network environments after the files to be synchronized are updated in one network environment is achieved, and the high consistency of the files to be synchronized in each network environment is effectively ensured.
An optional technical solution, synchronizing a file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment, may include: storing a file to be synchronized under a cloud desktop long-term path established under a first database user, and downloading the file to be synchronized stored under the cloud desktop long-term path to a cloud desktop temporary path; logging in a second database user, wherein a cloud desktop short-time path is created under the second database user, and the file synchronization interval duration of the cloud desktop short-time path is shorter than that of the cloud desktop long-time path; synchronizing the file to be synchronized stored on the temporary path of the cloud desktop to the short-time path of the cloud desktop through the logged-in second database user; the cloud desktop temporary path is a path created on a cloud desktop file server where a cloud desktop file server side is located, and the first database user and the second database user are both database users on the cloud desktop file server.
When the cloud desktop file server is a database server, the first database user is a database user on the cloud desktop file server, and may be a super system user, and the long path of the cloud desktop may be a path created under the first database user. The second database user is also a database user on the cloud desktop file server, and the cloud desktop short-time path may be a path created under the second database user. The paths arranged on the cloud desktop file server have respective file synchronization interval durations, and the file synchronization interval durations can indicate how often files to be synchronized stored in the corresponding paths are synchronized.
It should be noted that the file to be synchronized on the private cloud synchronization server is stored in the long-term path of the cloud desktop, and the interval duration of file synchronization in the long-term path of the cloud desktop is longer than the short-term path of the cloud desktop. On the basis, in order to accelerate the file synchronization speed, the file to be synchronized stored in the long path of the cloud desktop can be copied to the short path of the cloud desktop. However, these two paths are created under different database users, which makes the files to be synchronized stored under them impossible to directly copy. Accordingly, a cloud desktop temporary path is created on the cloud desktop file server, and the file to be synchronized downloaded from the cloud desktop long-time path is stored under the cloud desktop temporary path; and then, logging in the second database user, so that the files to be synchronized stored on the temporary path of the cloud desktop are synchronized to the short-time path of the cloud desktop which can only be used by the second database user through the logged-in second database user, and therefore the files to be synchronized can be synchronized through the short-time path of the cloud desktop, and the file synchronization speed is increased. In practical applications, optionally, the first database user may be a khsit, and the cloud desktop temporary path may be a BJ-CP path.
An optional technical solution, synchronizing a file to be synchronized to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment, may include: aiming at a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment, sending a file deletion instruction to the public cloud synchronization server, so that the public cloud synchronization server deletes a history synchronization file stored in a public cloud target path according to the received file deletion instruction, wherein the public cloud target path is a path created on a public cloud synchronization server where the public cloud synchronization server is located; and synchronizing the file to be synchronized to a public cloud target path. The file deleting instruction may be an instruction for deleting a history synchronization file created on the public cloud target path of the public cloud synchronization server, and the history synchronization file may be a file to be synchronized on the public cloud synchronization server at a history time point. In order to ensure the correctness of file synchronization, that is, a synchronized file to be synchronized is a file to be synchronized which needs to be synchronized this time, but not a file to be synchronized which has been synchronized previously, the public cloud testing server may send a file deleting instruction to the public cloud synchronization server to delete a history synchronization file, and then synchronize the file to be synchronized under a public cloud target path. On this basis, optionally, if the public cloud target path is not created on the public cloud synchronization server, the public cloud test server may send a file creation instruction for creating the public cloud target path to the public cloud synchronization server to create the public cloud target path.
An optional technical solution, where the file synchronization method further includes: when the cloud desktop file server detects the pre-synchronization file, synchronizing the pre-synchronization file to the public cloud synchronization server, so that the public cloud synchronization server synchronizes the received pre-synchronization file to the public cloud test server; the cloud desktop file server synchronizes the pre-synchronization file to the private cloud synchronization server, so that the private cloud synchronization server synchronizes the received pre-synchronization file to the private cloud test server. The pre-synchronization file can be a file to be synchronized to a public cloud environment and a private cloud environment, wherein the file is uploaded to a cloud desktop file server by development testers. The cloud desktop environment and the public cloud environment have a bidirectional synchronization function, and the cloud desktop environment has a unidirectional synchronization function towards the private cloud environment, so that when the cloud desktop file server detects the pre-synchronization file, the pre-synchronization file can be synchronized to the public cloud test server through the public cloud synchronization server, and the pre-synchronization file is synchronized to the private cloud test server through the private cloud synchronization server, so that the effect that the pre-synchronization file uploaded by the cloud desktop file server is highly consistent in the public cloud environment and the private cloud environment is achieved.
Example two
Fig. 2 is a flowchart of a file synchronization method according to a second embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, when the public cloud testing server deployed in the public cloud environment detects a file to be synchronized, the method may include: the method comprises the steps that a public cloud testing server deployed in a public cloud environment detects a file to be synchronized under an original path, wherein the original path is a path created on a public cloud testing server where the public cloud testing server is located; after synchronizing the file to be synchronized to the public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment, the file synchronization method may further include: and the public cloud test server deletes the file to be synchronized stored in the original path. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 2, the method of the present embodiment may specifically include the following steps:
s210, when a public cloud test server deployed in a public cloud environment detects files to be synchronized in an original path, synchronizing the files to be synchronized stored in the original path to the public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment, and deleting the files to be synchronized stored in the original path, wherein the original path is a path created on a public cloud test server where the public cloud test server is located.
After the file to be synchronized is uploaded to the original path created on the public cloud test server, the public cloud test server can detect the file to be synchronized under the original path. In order to ensure the accuracy of file synchronization, the file to be synchronized stored in the original path can be deleted after being synchronized to the public cloud synchronization server, so that the situation that the file to be synchronized which is already synchronized is synchronized again next time can be avoided.
On this basis, optionally, before the public cloud test server deployed in the public cloud environment detects the file to be synchronized, the file synchronization method may further include: when receiving a file detection instruction, the public cloud test server detects whether a file to be synchronized is stored in an original path according to the file detection instruction, wherein the file detection instruction is an instruction triggered when a current time point is a preset detection time point, optionally, the detection time point can be determined according to a preset starting time point and a preset detection time interval, and therefore the effect of detecting the file to be synchronized at regular time is achieved.
S220, after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in a cloud desktop environment.
S230, after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment.
S240, after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in the private cloud environment.
According to the technical scheme of the embodiment of the invention, after the public cloud test server detects the file to be synchronized in the original path, the file to be synchronized stored in the original path can be synchronized to the public cloud synchronization server, and the file to be synchronized stored in the original path is deleted, so that the situation that the same file to be synchronized is repeatedly synchronized is avoided.
On this basis, an optional technical solution is to synchronize the file to be synchronized to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment, and may include: copying a file to be synchronized from an original path to a created backup path, wherein the backup path is a path created on a public cloud test server; and synchronizing the file to be synchronized stored in the backup path or the original path to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment. After the public cloud synchronization server detects the file to be synchronized on the original path, the public cloud synchronization server can copy the file to be synchronized stored under the original path to a backup path which is created on the public cloud synchronization server in advance, so that the file to be synchronized can be found from the backup path even if the file to be synchronized under the original path is deleted subsequently, and the traceability of the file to be synchronized is ensured.
On this basis, optionally, the file synchronization method may further include: the public cloud test server acquires a current timestamp and creates a backup path named based on the current timestamp; synchronizing the file to be synchronized stored in the backup path to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment, which may include: acquiring a folder to be synchronized, which is corresponding to the backup path and stores the file to be synchronized; and synchronizing the folder to be synchronized to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment. The method comprises the steps of creating a backup path named based on a current timestamp, namely creating a folder to be synchronized with the folder name including the current timestamp, wherein files to be synchronized copied to the backup path can be understood as files to be synchronized copied to the folder to be synchronized, and then the folder to be synchronized with the current timestamp can be directly synchronized to a public cloud synchronization server, so that the effect that when the files to be synchronized are synchronized according to the folder to be synchronized, wherein the files to be synchronized can be definitely stored in the folder to be synchronized. In practical applications, the current timestamp may optionally be represented in the form of YYYYMMDDHHMI. Optionally, the public cloud testing server synchronizes the folder to be synchronized to the public cloud synchronization server, and then when the subsequent servers synchronize files, the folder to be synchronized may also be synchronized, that is, the public cloud synchronization server synchronizes the received folder to be synchronized to the cloud desktop file server, the cloud desktop file server synchronizes the received folder to be synchronized to the private cloud synchronization server, and then the private cloud synchronization server synchronizes the received folder to be synchronized to the private cloud testing server, thereby ensuring high consistency of the folder to be synchronized in the public cloud environment and the private cloud environment.
On this basis, optionally, the file synchronization method may further include: the public cloud test server acquires a timestamp registration file, adds a current timestamp to the timestamp registration file, and updates the timestamp registration file according to an addition result; synchronizing the folder to be synchronized to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment may include: and synchronizing the folder to be synchronized and the timestamp registration file to a public cloud synchronization server deployed in a public cloud environment and a cloud desktop environment. The time stamp registration file is a file stored in the public cloud test server, and a history time stamp associated with the history synchronization file is registered, and the history time stamp can be a current time stamp of the history synchronization file when the history synchronization file is synchronized. The integrity of each time stamp described in the time stamp registration file is ensured by adding the current time stamp to the time stamp registration file and updating the time stamp registration file in accordance with the addition result. And then, the folder to be synchronized and the timestamp registration file are synchronized to the public cloud synchronization server, so that the public cloud synchronization server can determine the accurate synchronization time of each file to be synchronized. In practical application, optionally, the public cloud testing server synchronizes the folder to be synchronized and the timestamp registration file to the public cloud synchronization server, so that when subsequent servers synchronize files, the folder to be synchronized and the timestamp registration file can still be synchronized, that is, the public cloud synchronization server synchronizes the received folder to be synchronized and the received timestamp registration file to the cloud desktop file server, the cloud desktop file server synchronizes the received folder to be synchronized and the received timestamp registration file to the private cloud synchronization server, and then the private cloud synchronization server synchronizes the received folder to be synchronized and the received timestamp registration file to the private cloud testing server, thereby ensuring high consistency of the folder to be synchronized and the timestamp registration file in the public cloud environment and the private cloud environment.
On this basis, optionally, after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to the private cloud test server deployed in the private cloud environment, which may include: after receiving the folder to be synchronized and the timestamp registration file, the private cloud synchronization server stores the folder to be synchronized and the timestamp registration file in a private cloud temporary path; acquiring a timestamp comparison file, and determining whether a target timestamp which is newly added in the timestamp comparison file is consistent with a current timestamp in a timestamp registration file; if not, synchronizing the folder to be synchronized stored in the temporary path of the private cloud to the target path of the private cloud, adding the current timestamp to the timestamp comparison file, and updating the timestamp comparison file according to the addition result; the private cloud temporary path and the private cloud target path are both paths created on a private cloud synchronization server where a private cloud synchronization server is located. Wherein the timestamp contrast file is a file stored on the private cloud synchronization server and recorded with a history timestamp of a history synchronization file which is synchronized each time, and the target timestamp may be a history timestamp which is newly added to the timestamp contrast file, so that it is possible to determine whether the file to be synchronized has been previously synchronized by comparing whether the target timestamp is identical to the target timestamp recorded in the timestamp registration file. Furthermore, when the target timestamp and the current timestamp are not consistent, it indicates that the file to be synchronized has not been synchronized previously, so that the folder to be synchronized stored in the private cloud temporary path can be synchronized to the private cloud target path created on the private cloud synchronization server, so that the private cloud synchronization server synchronizes the folder to be synchronized, which is stored in the private cloud target path and has not been synchronized previously, to the private cloud test server, thereby ensuring effective synchronization of the folder to be synchronized, which has not been synchronized previously. Meanwhile, the current timestamp can be added into the timestamp comparison file, so that the accuracy of timestamp comparison in the subsequent file synchronization process is guaranteed.
In order to better understand the specific implementation process of the above technical solutions, the following description is made by way of example with reference to specific examples. Taking the above servers as database servers as an example, as shown in fig. 3, the database a is equivalent to a public cloud test server 1, and the database B is equivalent to a public cloud test server 2, both of which are public cloud test servers deployed in a public cloud environment; the public cloud synchronization file server is equivalent to a public cloud synchronization server, the model parameter server is equivalent to a cloud desktop file server, and the private cloud synchronization file server is equivalent to a private cloud synchronization server; the database C corresponds to a private cloud test server 1, and the database B corresponds to a private cloud test server 2, both of which are private cloud test servers deployed in a private cloud environment. On the basis, a cloud desktop environment can be adopted to perform centralized flow management on files to be synchronized in multiple network environments (such as public cloud environment and private cloud environment), newly-added files to be synchronized can be synchronized at regular time through a synchronization server in each network environment, and the network environment receives the files to be synchronized at regular time, so that the effect of delaying the synchronous downloading of the files to be synchronized for a period of time is achieved.
EXAMPLE III
Taking the private cloud test server as a certain database server and the file to be synchronized as a script file (i.e., a database operation script file) for operating the database on the database server as an example, at least one database server may be deployed in the private cloud environment, and a plurality of database users may be located under each database server. After the database operation script file is synchronized to each database server, for each database user under a certain database server, the database operation script file can be executed after the database user needs to log on the database user so as to synchronously update the database parameters and/or the database model in the database related to the database user. When the above process is performed manually by a development tester, when the number of the database servers and/or the database users is too large, it is necessary to manually record which database user on which database server has executed which database operation script file to ensure consistency, and when the synchronous update operation is frequent, it is easy for operation errors to occur.
Fig. 4 is a flowchart of a file synchronization method provided in the third embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the file to be synchronized may include a database operation script file, and the file synchronization method may further include: after detecting the database operation script file, the private cloud test server side acquires a database user name according to the file name of the database operation script file, and acquires a database user password matched with the database user name in a preset ciphertext; and the private cloud test server logs in a target database user matched with the database user name and the database user password, and executes the database operation script file through the logged target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 4, the method of this embodiment may specifically include the following steps:
s310, when the public cloud testing server deployed in the public cloud environment detects the database operation script file, synchronizing the database operation script file to the public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment.
And S320, after receiving the database operation script file, the public cloud synchronization server synchronizes the database operation script file to the cloud desktop file server deployed in the cloud desktop environment.
S330, after receiving the database operation script file, the cloud desktop file server side synchronizes the database operation script file to a private cloud synchronization server side deployed in a cloud desktop environment and a private cloud environment.
And S340, after receiving the database operation script file, the private cloud synchronization server synchronizes the database operation script file to a private cloud test server deployed in the private cloud environment.
And S350, after the private cloud test server detects the database operation script file, acquiring a database user name according to the file name of the database operation script file, and acquiring a database user password matched with the database user name in a preset ciphertext.
The database operation script file and the database user have a corresponding relation, and the database user name can be recorded in the file name of the database operation script file, so that the database user name can be obtained according to the file name. The private cloud test server stores a preset ciphertext, wherein the database user name and the database user password of each database user are recorded, so that the database user password matched with the database user name can be acquired in the preset ciphertext.
And S360, the private cloud test server logs in a target database user matched with the database user name and the database user password, and executes the database operation script file through the logged target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located.
After obtaining the database user name and the database user password, the private cloud test server can log in a target database user based on the database user name and the database user password, and the target database user can be a database user matched with the database user name and the database user password in each database user. Furthermore, the database operation script file may be executed by the logged target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located, where the database model may be a Database Definition Language (DDL), and the database parameters may be a Data Manipulation Language (DML).
It should be noted that, for each database user on the private cloud test server, the above steps may be adopted to complete automatic login of the database user and automatic execution of the database operation script file.
According to the technical scheme of the embodiment of the invention, when the file to be synchronized is the database operation script file, after the private cloud test server detects the database operation script file, the private cloud test server can acquire the database user name according to the file name of the database operation script file, and then acquire the database user password matched with the database user name in the preset ciphertext, so that the effects of automatically identifying the database user name of the target database user corresponding to the database operation script file and automatically acquiring the database user password of the target database user are achieved; and then, logging in a target database user matched with the database user name and the database user password, and executing the database operation script file through the logged-in target database user to synchronously update the database parameters and/or the database model in the target database where the target database user is located, so that the effects of automatic logging in of the target database user and automatic execution of the database operation script file are achieved, and the effect of automatic synchronous updating of the database parameters and/or the database model is further achieved.
On this basis, an optional technical solution, the file synchronization method may further include: the private cloud test server determines whether the database operation script file is executed successfully; if so, adding a preset suffix to the file name, updating the file name according to the adding result, and otherwise, rolling back the database parameters and/or the database model. After the database operation script file is successfully executed, the database operation script file can be identified to be completely executed by adding a preset suffix to the file name, so that the situation that the executed database operation script file is repeatedly executed subsequently can be avoided; otherwise, the database parameters and/or the database model can be rolled back, that is, the modified database parameters and/or the database model are restored to the data state before modification, and optionally, alarm information can be sent to prompt development and test personnel to check on the basis.
On this basis, an optional technical solution is that obtaining the database user name according to the file name of the database operation script file may include: determining whether the file name of the database operation script file contains a preset suffix; and if not, acquiring the database user name according to the file name. That is, whether this database operation script file has been successfully executed is determined by whether a preset suffix is included in the file name, and the database user name is acquired from the file name when it has not been successfully executed, thereby achieving the purpose of avoiding the occurrence of re-execution of the database operation script file that has been successfully executed.
Example four
Fig. 5 is a block diagram of a file synchronization system according to a fourth embodiment of the present invention, where the file synchronization system is configured to execute a file synchronization method according to any of the foregoing embodiments. The system and the file synchronization method in the embodiments belong to the same inventive concept, and details which are not described in detail in the embodiments of the file synchronization system may refer to the embodiments of the file synchronization method. Referring to fig. 5, the system may specifically include: a public cloud testing server 410 deployed in a public cloud environment, a public cloud synchronization server 420 deployed in a public cloud environment and a cloud desktop environment, a cloud desktop file server 430 deployed in a cloud desktop environment, a private cloud synchronization server 440 deployed in a cloud desktop environment and a private cloud environment, and a private cloud testing server 450 deployed in a private cloud environment; the public cloud testing server 410 is configured to synchronize a file to be synchronized to the public cloud synchronization server 420 when the file to be synchronized is detected; the public cloud synchronization server 420 is configured to synchronize the file to be synchronized to the cloud desktop file server 430 after receiving the file to be synchronized; the cloud desktop file server 430 is configured to synchronize the file to be synchronized to the private cloud synchronization server 440 after receiving the file to be synchronized; the private cloud synchronization server 440 is configured to synchronize the file to be synchronized to the private cloud test server 450 after receiving the file to be synchronized.
On this basis, an optional technical solution is that the public cloud test service end 410 is specifically configured to:
when the file to be synchronized is detected in the original path, the file to be synchronized stored in the original path is synchronized to the public cloud synchronization server 420, and the file to be synchronized stored in the original path is deleted, wherein the original path is a path created on a public cloud test server where the public cloud test server 410 is located.
On this basis, optionally, the public cloud test service end 410 is specifically configured to:
when the file to be synchronized is detected in the original path, the file to be synchronized is copied from the original path to the created backup path, the file to be synchronized stored in the backup path or in the original path is synchronized to the public cloud synchronization server 420, and the file to be synchronized stored in the original path is deleted, wherein the backup path is a path created on the public cloud test server.
On this basis, optionally, the public cloud testing service end 410 is further configured to:
acquiring a current timestamp, and creating a backup path named based on the current timestamp;
correspondingly, the public cloud test service end 410 is specifically configured to:
when the file to be synchronized is detected in the original path, the file to be synchronized is copied from the original path to the created backup path, a folder to be synchronized, which is corresponding to the backup path and stores the file to be synchronized, is acquired, the folder to be synchronized is synchronized to the public cloud synchronization server 420, and the file to be synchronized stored in the original path is deleted.
On this basis, optionally, the public cloud testing service end 410 is further configured to:
acquiring a timestamp registration file, adding a current timestamp to the timestamp registration file, and updating the timestamp registration file according to an addition result;
correspondingly, the public cloud test service end 410 is specifically configured to:
when the file to be synchronized is detected in the original path, the file to be synchronized is copied from the original path to the created backup path, a folder to be synchronized, which stores the file to be synchronized and corresponds to the backup path, is acquired, the folder to be synchronized and the timestamp registration file are synchronized to the public cloud synchronization server 420, and the file to be synchronized stored in the original path is deleted.
On this basis, optionally, the private cloud synchronization server 440 is specifically configured to:
after receiving the folder to be synchronized and the timestamp registration file, storing the folder to be synchronized and the timestamp registration file in a private cloud temporary path; acquiring a timestamp comparison file, and determining whether a target timestamp which is newly added in the timestamp comparison file is consistent with a current timestamp in a timestamp registration file; if not, synchronizing the folder to be synchronized stored in the temporary path of the private cloud to the target path of the private cloud, adding the current timestamp to the timestamp comparison file, and updating the timestamp comparison file according to the addition result; the private cloud temporary path and the private cloud target path are both paths created on the private cloud synchronization server where the private cloud synchronization server 440 is located.
Another optional technical solution is that the public cloud test service end 410 is further configured to:
before a file to be synchronized is detected, when a file detection instruction is received, whether the file to be synchronized is stored in an original path or not is detected according to the file detection instruction, wherein the file detection instruction is an instruction triggered when the current time point is a preset detection time point.
Optionally, the cloud desktop file server 430 is specifically configured to:
after receiving a file to be synchronized, storing the file to be synchronized under a cloud desktop long-term path established under a first database user, and downloading the file to be synchronized stored under the cloud desktop long-term path to a cloud desktop temporary path; logging in a second database user, wherein a cloud desktop short-time path is created under the second database user, and the file synchronization interval duration of the cloud desktop short-time path is shorter than that of the cloud desktop long-time path; synchronizing the file to be synchronized stored on the temporary path of the cloud desktop to the short-time path of the cloud desktop through the logged-in second database user; the cloud desktop temporary path is a path created on a cloud desktop file server where the cloud desktop file server 430 is located, and the first database user and the second database user are both database users on the cloud desktop file server.
Optionally, the public cloud testing server 410 is specifically configured to:
when a file to be synchronized is detected, sending a file deletion instruction to the public cloud synchronization server 420, so that the public cloud synchronization server 420 deletes the history synchronization file stored in a public cloud target path according to the received file deletion instruction, wherein the public cloud target path is a path created on a public cloud synchronization server where the public cloud synchronization server 420 is located; and synchronizing the file to be synchronized to the public cloud target path.
Optionally, the public cloud testing server 410 is specifically configured to:
when the file to be synchronized is detected, the file to be synchronized is synchronized to the public cloud synchronization server 420 deployed in the public cloud environment and the cloud desktop environment through the secure file transfer protocol.
Optionally, the cloud desktop file server 430 is further configured to:
when the pre-synchronization file is detected, synchronizing the pre-synchronization file to the public cloud synchronization server 420, so that the public cloud synchronization server 420 synchronizes the received pre-synchronization file to the public cloud test server 410; the pre-synchronization file is synchronized to the private cloud synchronization server 440, so that the private cloud synchronization server 440 synchronizes the received pre-synchronization file to the private cloud test server 450.
Optionally, the file to be synchronized includes a database operation script file, and the private cloud testing server 450 is further configured to:
after detecting the database operation script file, acquiring a database user name according to the file name of the database operation script file, and acquiring a database user password matched with the database user name in a preset ciphertext; logging in a target database user matched with the database user name and the database user password, and executing a database operation script file through the logged-in target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located.
On this basis, optionally, the private cloud testing service end 450 is further configured to:
determining whether the database operation script file is executed successfully; if so, adding a preset suffix to the file name, updating the file name according to the adding result, and otherwise, rolling back the database parameters and/or the database model.
On this basis, optionally, the private cloud testing server 450 is specifically configured to:
after detecting the database operation script file, determining whether the file name of the database operation script file contains a preset suffix, if not, acquiring a database user name according to the file name, and acquiring a database user password matched with the database user name in a preset password; logging in a target database user matched with the database user name and the database user password, and executing a database operation script file through the logged-in target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located.
The file synchronization system provided by the fourth embodiment of the invention comprises a public cloud testing service end deployed in a public cloud environment, a public cloud synchronization service end deployed in a public cloud environment and a cloud desktop environment, a cloud desktop file service end deployed in a cloud desktop environment, a private cloud synchronization service end deployed in a cloud desktop environment and a private cloud environment, and a private cloud testing service end deployed in a private cloud environment, wherein the service ends are matched with each other, so that the problems of low efficiency and high error rate caused by manually synchronizing files to be synchronized in different network environments are solved, the files to be synchronized can be automatically synchronized in a plurality of network environments which are not communicated with each other, and after the files to be synchronized are updated in one network environment, the automatic synchronization effect of the files to be synchronized under other network environments effectively ensures the high consistency of the files to be synchronized under each network environment.
The file synchronization system provided by the embodiment of the invention can execute the file synchronization method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the file synchronization system, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE five
An embodiment of the present invention provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a file synchronization method, including:
when a public cloud test server deployed in a public cloud environment detects a file to be synchronized, synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment;
after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in a cloud desktop environment;
after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in a cloud desktop environment and a private cloud environment;
after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in a private cloud environment.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the file synchronization method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. With this understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (17)

1. A method for synchronizing files, comprising:
when a public cloud testing server deployed in a public cloud environment detects a file to be synchronized, synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment;
after receiving the file to be synchronized, the public cloud synchronization server synchronizes the file to be synchronized to a cloud desktop file server deployed in the cloud desktop environment;
after receiving the file to be synchronized, the cloud desktop file server synchronizes the file to be synchronized to a private cloud synchronization server deployed in the cloud desktop environment and the private cloud environment;
after receiving the file to be synchronized, the private cloud synchronization server synchronizes the file to be synchronized to a private cloud test server deployed in the private cloud environment.
2. The method according to claim 1, wherein the public cloud testing server deployed in the public cloud environment, when detecting the file to be synchronized, includes:
a public cloud testing server deployed in a public cloud environment detects a file to be synchronized under an original path, wherein the original path is a path created on a public cloud testing server where the public cloud testing server is located;
after the file to be synchronized is synchronized to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment, the method further comprises the following steps:
and the public cloud testing server deletes the file to be synchronized stored in the original path.
3. The method according to claim 2, wherein the synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment comprises:
copying the file to be synchronized from the original path to a created backup path, wherein the backup path is a path created on the public cloud test server;
and synchronizing the file to be synchronized stored in the backup path or the original path to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment.
4. The method of claim 3, further comprising:
the public cloud testing server side obtains a current timestamp and creates the backup path named based on the current timestamp;
the synchronizing the file to be synchronized stored in the backup path to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment includes:
acquiring a folder to be synchronized, which corresponds to the backup path and stores the file to be synchronized;
and synchronizing the folder to be synchronized to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment.
5. The method of claim 4, further comprising:
the public cloud test server acquires a timestamp registration file, adds the current timestamp to the timestamp registration file, and updates the timestamp registration file according to an addition result;
the synchronizing the folder to be synchronized to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment includes:
and synchronizing the folder to be synchronized and the timestamp registration file to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment.
6. The method according to claim 5, wherein the private cloud synchronization server, after receiving the file to be synchronized, synchronizes the file to be synchronized to a private cloud test server deployed in the private cloud environment, and includes:
after receiving the folder to be synchronized and the timestamp registration file, the private cloud synchronization server stores the folder to be synchronized and the timestamp registration file in a private cloud temporary path;
acquiring a timestamp comparison file, and determining whether a target timestamp which is newly added in the timestamp comparison file is consistent with the current timestamp in the timestamp registration file;
if not, synchronizing the folder to be synchronized stored in the private cloud temporary path to a private cloud target path, adding the current timestamp to the timestamp comparison file, and updating the timestamp comparison file according to an addition result;
the private cloud temporary path and the private cloud target path are both paths created on a private cloud synchronization server where the private cloud synchronization server is located.
7. The method according to claim 2, before the public cloud testing server deployed in the public cloud environment detects the file to be synchronized, further comprising:
and when the public cloud test server receives a file detection instruction, detecting whether the file to be synchronized is stored in the original path or not according to the file detection instruction, wherein the file detection instruction is an instruction triggered when the current time point is a preset detection time point.
8. The method according to claim 1, wherein the synchronizing the file to be synchronized to a private cloud synchronization server deployed in the cloud desktop environment and the private cloud environment comprises:
storing the file to be synchronized to a cloud desktop long-term path established under a first database user, and downloading the file to be synchronized stored under the cloud desktop long-term path to a cloud desktop temporary path;
logging in a second database user, wherein a cloud desktop short-time path is created under the second database user, and the file synchronization interval duration of the cloud desktop short-time path is shorter than that of the cloud desktop long-time path;
synchronizing the file to be synchronized stored on the temporary path of the cloud desktop to the short-time path of the cloud desktop through the logged-in second database user;
the cloud desktop temporary path is a path created on a cloud desktop file server where the cloud desktop file server is located, and the first database user and the second database user are both database users on the cloud desktop file server.
9. The method according to claim 1, wherein the synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment comprises:
aiming at a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment, sending a file deletion instruction to the public cloud synchronization server, so that the public cloud synchronization server deletes a history synchronization file stored in a public cloud target path according to the received file deletion instruction, wherein the public cloud target path is a path created on a public cloud synchronization server where the public cloud synchronization server is located;
and synchronizing the file to be synchronized to the public cloud target path.
10. The method according to claim 1, wherein the synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment comprises:
and synchronizing the file to be synchronized to a public cloud synchronization server deployed in the public cloud environment and the cloud desktop environment through a secure file transfer protocol.
11. The method of claim 1, further comprising:
when the cloud desktop file server detects a pre-synchronization file, synchronizing the pre-synchronization file to the public cloud synchronization server, so that the public cloud synchronization server synchronizes the received pre-synchronization file to the public cloud test server;
the cloud desktop file server side synchronizes the pre-synchronization file to the private cloud synchronization server side, so that the private cloud synchronization server side synchronizes the received pre-synchronization file to the private cloud testing server side.
12. The method of claim 1, wherein the file to be synchronized comprises a database operation script file, further comprising:
after detecting the database operation script file, the private cloud test server acquires a database user name according to the file name of the database operation script file, and acquires a database user password matched with the database user name in a preset password;
and the private cloud test server logs in a target database user matched with the database user name and the database user password, and executes the database operation script file through the logged target database user so as to synchronously update the database parameters and/or the database model in the target database where the target database user is located.
13. The method of claim 12, further comprising:
the private cloud test server determines whether the database operation script file is executed successfully;
if so, adding a preset suffix to the file name, updating the file name according to the adding result, and otherwise, rolling back the database parameter and/or the database model.
14. The method of claim 13, wherein obtaining a database username from a file name of the database operation script file comprises:
determining whether the file name of the database operation script file contains the preset suffix;
and if not, acquiring the database user name according to the file name.
15. A file synchronization system, comprising: the cloud desktop file testing system comprises a public cloud testing server deployed in a public cloud environment, a public cloud synchronization server deployed in the public cloud environment and a cloud desktop environment, a cloud desktop file server deployed in the cloud desktop environment, a private cloud synchronization server deployed in the cloud desktop environment and a private cloud environment, and a private cloud testing server deployed in the private cloud environment; wherein the content of the first and second substances,
the public cloud testing server is used for synchronizing the file to be synchronized to the public cloud synchronization server when the file to be synchronized is detected;
the public cloud synchronization server is used for synchronizing the file to be synchronized to the cloud desktop file server after receiving the file to be synchronized;
the cloud desktop file server is used for synchronizing the file to be synchronized to the private cloud synchronization server after receiving the file to be synchronized;
and the private cloud synchronization server is used for synchronizing the file to be synchronized to the private cloud test server after receiving the file to be synchronized.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the file synchronization method according to any one of claims 1 to 14.
17. A computer program product comprising a computer program which, when executed by a processor, implements the file synchronization method of any of claims 1-14.
CN202111265134.2A 2021-10-28 2021-10-28 File synchronization method, system and storage medium Pending CN113986851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111265134.2A CN113986851A (en) 2021-10-28 2021-10-28 File synchronization method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111265134.2A CN113986851A (en) 2021-10-28 2021-10-28 File synchronization method, system and storage medium

Publications (1)

Publication Number Publication Date
CN113986851A true CN113986851A (en) 2022-01-28

Family

ID=79743649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111265134.2A Pending CN113986851A (en) 2021-10-28 2021-10-28 File synchronization method, system and storage medium

Country Status (1)

Country Link
CN (1) CN113986851A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348272A (en) * 2022-08-15 2022-11-15 四川虹美智能科技有限公司 Automatic synchronization method and device for server output

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348272A (en) * 2022-08-15 2022-11-15 四川虹美智能科技有限公司 Automatic synchronization method and device for server output

Similar Documents

Publication Publication Date Title
CN106874389B (en) Data migration method and device
CN107291750B (en) Data migration method and device
US10229181B2 (en) System and method for synchronizing data between communication devices in a networked environment without a central server
WO2016192327A1 (en) Network-based file cloud synchronization method
WO2020151181A1 (en) Cross-platform data updating method and apparatus based on block chain, and computer device
US20130151468A1 (en) File synchronization method and device
CN111628886B (en) Method, device and computer equipment for building blockchain network in private cloud environment
CN110602165B (en) Government affair data synchronization method, device, system, computer equipment and storage medium
EP3948568B1 (en) Messaging to enforce operation serialization for consistency of a distributed data structure
CN110737719A (en) Data synchronization method, device, equipment and computer readable storage medium
CN112506702A (en) Data center disaster tolerance method, device, equipment and storage medium
CN113986851A (en) File synchronization method, system and storage medium
CN113190448A (en) Test code updating method and device, electronic equipment and storage medium
CN110958287A (en) Operation object data synchronization method, device and system
CN111147226B (en) Data storage method, device and storage medium
CN104618474B (en) Facility information store method and device
CN114285779B (en) Processing method, device and system of test request
CN105824916B (en) Data synchronous system and method
CN114756410A (en) Data recovery method, device and medium for dual-computer hot standby system
CN111898161B (en) Method, system, device and medium for managing authority of HUE
CN111522875B (en) Distributed system data copy consistency monitoring method for full data synchronization
CN113760843A (en) Site deployment method and terminal
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium
CN110134558B (en) Method and device for detecting server
Komosny et al. Testing Internet applications and services using PlanetLab

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