TWI486759B - Subversion configuration library backup method and device - Google Patents
Subversion configuration library backup method and device Download PDFInfo
- Publication number
- TWI486759B TWI486759B TW099115479A TW99115479A TWI486759B TW I486759 B TWI486759 B TW I486759B TW 099115479 A TW099115479 A TW 099115479A TW 99115479 A TW99115479 A TW 99115479A TW I486759 B TWI486759 B TW I486759B
- Authority
- TW
- Taiwan
- Prior art keywords
- version
- backup
- synchronization
- backup configuration
- error information
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 34
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 description 6
- 238000003672 processing method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本申請涉及電腦應用技術領域,特別是涉及一種Subversion配置庫的備份方法及裝置。The present application relates to the field of computer application technologies, and in particular, to a backup method and apparatus for a Subversion configuration library.
Subversion,簡稱SVN,是一種近幾年發展起來的代碼版本管理軟體,相對於傳統的版本控制軟體,SVN具有諸多優勢。目前,已經有越來越多的開發者開始使用SVN進行代碼的管理和控制。Subversion, or SVN for short, is a code version management software developed in recent years. Compared with traditional version control software, SVN has many advantages. At present, more and more developers have begun to use SVN for code management and control.
對於代碼版本管理軟體而言,配置庫的備份是一種必要的需求,現有技術中,最常見和簡單的備份方法就是直接使用拷貝命令,將配置庫目錄拷貝到備份目錄上。但是,由於配置庫的資料量往往非常大,因此每次完全備份都需要很長的時間。For code version management software, backup of the configuration library is a necessary requirement. In the prior art, the most common and simple backup method is to copy the configuration library directory to the backup directory by directly using the copy command. However, because the amount of data in the configuration repository is often very large, it takes a long time for each full backup.
現有技術的另一種方式是使用sync命令對配置庫進行同步,每進行一次同步操作,備份配置庫僅對源配置庫中相對上一次同步時所更新的內容進行備份,因此備份速度明顯提高。但是,這種方法所存在的問題是:一旦在某次同步過程中發生錯誤,那麼後續的版本也將無法繼續同步更新,當前已備份的正確資料也無法進行使用。而且即使從零開始重新部署一個新的備份配置庫,仍然無法保證後續的同步操作中不出現錯誤,也就是說,配置庫同步操作在實際上可能是無法持續進行的。Another way of the prior art is to use the sync command to synchronize the configuration library. Each time the synchronization operation is performed, the backup configuration library only backs up the content updated in the source configuration database relative to the previous synchronization, so the backup speed is significantly improved. However, the problem with this method is that once an error occurs during a certain synchronization process, subsequent versions will not be able to continue to update synchronously, and the correct data that has been backed up cannot be used. And even if you redeploy a new backup configuration repository from scratch, there is no guarantee that errors will not occur in subsequent synchronization operations, that is, configuration library synchronization operations may not be sustainable in practice.
為解決上述技術問題,本申請實施例提供一種Subversion配置庫的備份方法及裝置,以實現對配置庫同步錯誤的處理,保證配置庫的同步操作能夠持續進行,技術方案如下:一種Subversion配置庫的備份方法,預先為備份配置庫設置版本屬性,該版本屬性用於記錄備份配置庫中最後一個版本的標識;該備份方法包括:根據備份配置庫的版本屬性,執行配置庫同步操作;如果同步操作成功,則將備份配置庫的版本屬性值更新為本次成功同步的版本標識;如果同步操作失敗,則在確定當前版本為不可同步版本之後,通過完全拷貝方式對源配置庫進行備份,並且將備份配置庫的版本屬性值更新為該不可同步版本的標識。To solve the above technical problem, the embodiment of the present application provides a backup method and device for a Subversion configuration library, so as to implement a synchronization error of the configuration library, and ensure that the synchronization operation of the configuration library can be continued. The technical solution is as follows: a Subversion configuration library The backup method, in advance, sets a version attribute for the backup configuration library, where the version attribute is used to record the identifier of the last version in the backup configuration repository; the backup method includes: performing a configuration library synchronization operation according to the version attribute of the backup configuration library; If successful, the version attribute value of the backup configuration repository is updated to the version identifier of the successful synchronization; if the synchronization operation fails, after determining that the current version is an unsynchronized version, the source configuration library is backed up by full copy mode, and The version property value of the backup configuration repository is updated to the identity of the non-synchronizable version.
一種Subversion配置庫的備份裝置,包括:同步單元,用於根據備份配置庫的版本屬性,執行配置庫同步操作;同步成功處理單元,用於在同步操作成功時,將預先設置的備份配置庫的版本屬性值更新為本次成功同步的版本標識;其中,該預先設置的版本屬性用於記錄備份配置庫中最後一個版本的標識;同步失敗處理單元,用於在同步操作失敗時,在確定當前版本為不可同步版本之後,通過完全拷貝方式對源配置庫進行備份,並且將備份配置庫的版本屬性值更新為該不可同步版本的標識。A backup device of the Subversion configuration library, comprising: a synchronization unit, configured to perform a configuration library synchronization operation according to a version attribute of the backup configuration library; and a synchronization success processing unit, configured to: when the synchronization operation is successful, the preset backup configuration database is The version attribute value is updated to the version identifier of the successful synchronization; wherein the pre-set version attribute is used to record the identifier of the last version in the backup configuration repository; the synchronization failure processing unit is configured to determine the current when the synchronization operation fails After the version is not synchronizable, the source configuration repository is backed up by full copy and the version attribute value of the backup configuration repository is updated to the identity of the non-synchronizable version.
現有技術中,在對配置庫進行首次同步之前,需要先創建一個空的備份配置庫並對其進行初始化,一旦在某次同步過程中發生錯誤,將導致之前已經備份的正確資料無法使用,並且同步操作也難以繼續。而應用本申請技術方案無需對備份配置庫進行初始化,通過直接為備份配置庫設置版本屬性,可以在同步操作無法正確進行時,通過拷貝的方式進行備份,然後通過修改備份配置庫的版本屬性,使得同步操作可以在當前拷貝備份的基礎上繼續進行。In the prior art, before the first synchronization of the configuration library, an empty backup configuration library needs to be created and initialized. Once an error occurs in a certain synchronization process, the correct data that has been backed up before is not used, and Synchronous operations are also difficult to continue. The application of the technical solution of the present application does not need to initialize the backup configuration library. By setting the version attribute directly for the backup configuration library, the backup operation can be performed by copying when the synchronization operation cannot be performed correctly, and then the version attribute of the backup configuration library is modified. This allows the synchronization operation to continue on the basis of the current copy backup.
此外,本申請還針對一些特定的同步失敗原因,提供了相應的自動處理方法,如果自動處理之後可以直接繼續進行同步處理,則可以避免使用完全拷貝方式,從而進一步提高配置庫的備份效率。In addition, the present application also provides a corresponding automatic processing method for some specific reasons for synchronization failure. If the synchronization process can be directly continued after the automatic processing, the full copy mode can be avoided, thereby further improving the backup efficiency of the configuration library.
現有的配置庫同步方案,在對配置庫進行首次同步之前,需要先創建一個空的備份配置庫並使用svnsync init命令對其進行初始化,一旦在某次同步過程中發生錯誤,將導致之前已經備份的正確資料無法使用,並且即使重新部署一個新的備份配置庫,仍然難以保證後續同步操作的正確進行。The existing configuration library synchronization scheme needs to create an empty backup configuration library and initialize it with the svnsync init command before the first synchronization of the configuration database. Once an error occurs during a synchronization, it will be backed up before. The correct data is not available, and even if a new backup configuration repository is redeployed, it is still difficult to ensure that subsequent synchronization operations are performed correctly.
為解決上述技術問題,本申請提供的技術方案是:預先為備份配置庫設置一個版本屬性,這個版本屬性的作用是記錄備份配置庫中最後一個版本的標識,其中,在正常情況下,“最後一個版本”即為上一次成功同步的版本,而當同步失敗時,可以通過修改該屬性值,使得同步操作能夠持續進行。To solve the above technical problem, the technical solution provided by the present application is: pre-set a version attribute for the backup configuration library, and the role of the version attribute is to record the identifier of the last version in the backup configuration library, wherein, under normal circumstances, "final A version" is the last successful synchronization version, and when the synchronization fails, the attribute value can be modified to make the synchronization operation continue.
本申請實施例所提供的Subversion配置庫備份方法包括以下基本步驟:根據備份配置庫的版本屬性,執行配置庫同步操作;如果同步操作成功,則將備份配置庫的版本屬性值更新為本次成功同步的版本標識;如果同步操作失敗,則在確定當前版本為不可同步版本之後,通過完全拷貝方式對源配置庫進行備份,並且將備份配置庫的版本屬性值更新為該不可同步版本的標識。The Subversion configuration library backup method provided by the embodiment of the present application includes the following basic steps: performing a configuration library synchronization operation according to the version attribute of the backup configuration library; if the synchronization operation is successful, updating the version attribute value of the backup configuration database to the success Synchronized version identifier; if the synchronization operation fails, after determining that the current version is an unsynchronizable version, the source configuration repository is backed up by full copy mode, and the version attribute value of the backup configuration repository is updated to the identifier of the non-synchronizable version.
應用上述方案,無需對備份配置庫進行初始化,通過直接為備份配置庫設置版本屬性,可以在同步操作無法正確進行時,通過拷貝的方式進行備份,然後通過修改備份配置庫的版本屬性,使得同步操作可以在當前拷貝備份的基礎上繼續進行。Applying the above solution, you do not need to initialize the backup configuration repository. By setting the version attribute directly for the backup configuration repository, you can back up by copying when the synchronization operation cannot be performed correctly, and then modify the version attribute of the backup configuration repository to make the synchronization. The operation can continue on the basis of the current copy backup.
為了使本技術領域的人員更好地理解本申請中的技術方案,下面將結合本申請實施例中的附圖,對本申請實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本申請一部分實施例,而不是全部的實施例。基於本申請中的實施例,本領域普通技術人員所獲得的所有其他實施例,都應當屬於本申請保護的範圍。The technical solutions in the embodiments of the present application are clearly and completely described in the following, in which the technical solutions in the embodiments of the present application are clearly and completely described. The embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in the present application should fall within the scope of the present application.
圖1所示為本申請實施例所提供的Subversion配置庫備份方法流程圖,其中,設repo1為源配置庫、repo2為備份配置庫,該方法包括以下步驟:S101,根據備份配置庫的版本屬性,執行配置庫同步操作;在進行配置庫同步操作之前,需要對備份配置庫進行屬性設置,其中,必要的屬性設置包括備份配置庫的版本屬性:svn:sync-last-merged-rev該屬性所記錄的是備份配置庫中最後一個版本的標識,即repo2/db/current中記錄的版本號,如果當前的配置庫為空,則可以取版本號為0。在下一次同步時,通過讀取該屬性,就可以繼續進行後續版本的同步。1 is a flowchart of a backup method of a Subversion configuration library provided by an embodiment of the present application, where repo1 is a source configuration library and repo2 is a backup configuration library, and the method includes the following steps: S101, according to a version attribute of a backup configuration library To perform the configuration library synchronization operation; before performing the configuration library synchronization operation, you need to set the property of the backup configuration library. The necessary attribute settings include the version attribute of the backup configuration library: svn:sync-last-merged-rev The record is the identifier of the last version in the backup configuration repository, that is, the version number recorded in repo2/db/current. If the current configuration library is empty, the version number can be taken as 0. On the next synchronization, by reading this property, you can continue the synchronization of subsequent versions.
此外,需要設置的備份配置庫屬性還包括:源配置庫的標識:In addition, the backup configuration repository properties that need to be set include: the identity of the source configuration repository:
svn:sync-from-uuidSvn:sync-from-uuid
該屬性所記錄的是同步操作時所讀取的配置庫的標識,其中uuid為配置庫的標識,在本實施例中,所設置的屬性值即為repo1的uuid。This attribute records the identifier of the configuration repository that is read during the synchronization operation. The uuid is the identifier of the configuration repository. In this embodiment, the attribute value set is the uuid of repo1.
源配置庫的位址:Source configuration library address:
svn:sync-from-urlSvn:sync-from-url
該屬性所記錄的是源配置庫的儲存路徑,在本實施例中,所設置的屬性值即為repo1的儲存路徑。This attribute records the storage path of the source configuration repository. In this embodiment, the set attribute value is the storage path of repo1.
上述屬性均為repo2的全局屬性,屬性設置完畢後,就為源配置庫和備份配置庫建立了同步鏈結,執行svnsync sync http://localhost/repo2進行同步操作,根據repo2的版本屬性sync-last-merged-rev,即可將源配置庫中該版本之後的更新版本備份至repo2。The above attributes are all global attributes of repo2. After the attribute is set, a synchronization link is established for the source configuration repository and the backup configuration repository. The svnsync sync http://localhost/repo2 is executed for synchronization, according to the version attribute of repo2 sync- Last-merged-rev, you can back up the updated version after this version in the source configuration repository to repo2.
其中,也可以做進一步的配置,以實現在repo1有新的修訂版本提交時自動同步,從而建立repo1和repo2的即時同步。例如,可以通過對repo1的post-commit檔進行腳本定義,使得repo1在有新修訂版本提交時,自動觸發執行同步操作。Among them, further configuration can be made to achieve automatic synchronization when repo1 has a new revision commit, thereby establishing instant synchronization of repo1 and repo2. For example, you can script the repo1 post-commit file so that repo1 automatically triggers the synchronization operation when a new revision is submitted.
S102,如果同步操作成功,則將備份配置庫的版本屬性值更新為本次成功同步的版本標識;在正常情況下,每次同步操作成功之後,則自動將repo2的版本屬性更新為剛剛成功同步的版本標識。在下一次同步時,就會直接在該版本內容的基礎上進行內容更新。S102. If the synchronization operation succeeds, the version attribute value of the backup configuration repository is updated to the version identifier of the successful synchronization; under normal circumstances, after each synchronization operation succeeds, the version attribute of the repo2 is automatically updated to just successfully synchronized. The version identifier. At the next synchronization, content updates will be made directly based on the content of the version.
S103,如果同步操作失敗,則在確定當前版本為不可同步版本之後,通過完全拷貝方式對源配置庫進行備份,並且將備份配置庫的版本屬性值更新為該不可同步版本的標識。S103. If the synchronization operation fails, after determining that the current version is an unsynchronized version, the source configuration library is backed up by the full copy mode, and the version attribute value of the backup configuration library is updated to the identifier of the non-synchronizable version.
如果同步操作不成功,則可以直接確定當前版本為不可同步版本。這裏所述的不可同步版本,仍然是一個可以正確運行的版本,其本身的代碼並不存在問題,只是由於某種原因,導致無法正確同步到備份配置庫中去。此時,可以通過完全拷貝的方式,將源配置庫中的所有版本(包括其中的不可備份版本)重新備份到備份配置庫。If the synchronization operation is unsuccessful, you can directly determine that the current version is an unsynchronized version. The unsynchronized version described here is still a version that can run correctly, and its own code is not a problem, but for some reason, it cannot be properly synchronized to the backup configuration repository. At this point, all versions (including non-backupable versions of the source configuration repository) in the source configuration repository can be backed up to the backup configuration repository by full copy.
現有技術中,同步操作必須在對空備份配置庫進行初始化之後進行,如果之前的版本採用的是拷貝方式進行備份,則無法在此基礎上再進行同步操作。而在本發明實施例中,通過拷貝方式備份源配置庫以後,還要進一步將備份配置庫的版本屬性修改成不可同步版本的版本號。也就是說,通過修改版本屬性,令系統把通過拷貝方式備份的版本識別為通過同步方式備份的版本,從而將無法同步的版本跳過,保證同步繼續進行。In the prior art, the synchronization operation must be performed after the initialization of the empty backup configuration library. If the previous version uses the copy mode for backup, the synchronization operation cannot be performed on this basis. In the embodiment of the present invention, after the source configuration library is backed up by copying, the version attribute of the backup configuration library is further modified to the version number of the non-synchronizable version. That is to say, by modifying the version attribute, the system recognizes the version backed up by the copy mode as the version backed up by the synchronous method, thereby skipping the version that cannot be synchronized, and ensuring that the synchronization continues.
當然,在實際應用中,有些特定原因所導致的同步失敗,是可以通過一定的方法進行快速處理的。因此,本申請實施例還提供以下的同步失敗自動處理方法:當出現同步操作失敗時,首先獲取相應的錯誤資訊,常見的錯誤資訊包括:備份配置庫鎖定、備份配置庫的某個檔鎖定、備份配置庫最後一個版本錯誤等,以下將分別進行說明。Of course, in actual applications, the synchronization failure caused by some specific reasons can be quickly processed by a certain method. Therefore, the embodiment of the present application further provides the following automatic synchronization failure processing method: when the synchronization operation fails, the corresponding error information is first obtained, and the common error information includes: backup configuration database locking, backup of a certain file lock of the configuration library, The last version of the backup configuration repository is incorrect, etc., which will be explained separately below.
a)備份配置庫鎖定:該類錯誤的錯誤資訊類似“Failed to get lock on destination repos,currently held by'alicode:1b27a4fd-fb0e-42a0-a13f-9091cc87b9ac'”的形式,其中“alicode”為機器名。a) Backup configuration repository lock: The error information of this type of error is similar to the form of "Failed to get lock on destination repos, currently held by 'alicode: 1b27a4fd-fb0e-42a0-a13f-9091cc87b9ac'", where "alicode" is the machine name .
在同步過程中,可能會因為網路斷線或者其他因素導致sync程式中止,再執行下一次同步時就會失敗,這時候需要清除備份配置庫的鎖定保護,即通過以下命令刪除備份配置庫的sync-lock屬性:During the synchronization process, the sync program may be aborted due to network disconnection or other factors, and then the next synchronization will fail. In this case, you need to clear the lock protection of the backup configuration repository, that is, delete the backup configuration database by the following command. Sync-lock attribute:
svn propdel svn:sync-lock--revprop-r 0 http://localhost/repo2Svn propdel svn:sync-lock--revprop-r 0 http://localhost/repo2
b)備份配置庫的某個檔鎖定:b) Back up a file lock of the configuration repository:
該類錯誤的錯誤資訊為:The error information for this type of error is:
svnsync: Server sent unexpected return value(423 Locked)Svnsync: Server sent unexpected return value(423 Locked)
Subversion在用戶端可以使用lock功能將某個目錄或檔進行鎖定,只有鎖定人員可以修改該檔或目錄,在進行同步的時候,備份庫如果出現這樣的版本,執行同步時會因沒有許可權而導致同步失敗,此時需要將備份庫中的相應檔鎖定清除才能繼續同步,具體方法如下:Subversion can use the lock function on the user side to lock a directory or file. Only the locker can modify the file or directory. When the synchronization is performed, if the backup library has such a version, the synchronization will be performed without permission. The synchronization fails. In this case, you need to clear the corresponding file in the backup library to continue synchronization. The specific method is as follows:
svnadmin rmlocks repo2/xxxxSvnadmin rmlocks repo2/xxxx
其中,xxxx表示被鎖檔的路徑及檔案名。Among them, xxxx represents the path and file name of the locked file.
c)備份配置庫最後一個版本錯誤:c) The last version of the backup configuration repository is incorrect:
該類錯誤的錯誤資訊為:The error information for this type of error is:
svnsync: Missing node-id in node-revSvnsync: Missing node-id in node-rev
在同步過程中,可能會因為網路或配置庫回應速度等問題造成備份庫的最新版本提交資訊不完整,即最後同步的版本資訊不全,此時備份配置庫表現為不可用,也無法繼續同步。應用本申請所提供的技術方案,可以刪除備份配置庫的最後版本,即刪除repo2/db/revs和repo2/db/reprops路徑下的最新版本,同時將repo2/db/current中記錄的版本號-1。同時,還要將備份配置庫的版本屬性值修改為該最後一個版本的前一個版本的標識,以便在下一次同步時,重新備份之前沒有備份完整的版本。During the synchronization process, the latest version of the backup library may be incomplete due to problems such as the network or configuration library response speed, that is, the version information of the last synchronization is incomplete. At this time, the backup configuration library is unavailable and cannot continue to be synchronized. . Applying the technical solution provided in this application, you can delete the last version of the backup configuration repository, that is, delete the latest version under the repo2/db/revs and repo2/db/reprops paths, and the version number recorded in repo2/db/current - 1. At the same time, the version attribute value of the backup configuration repository is also modified to the identifier of the previous version of the last version, so that the next version is not backed up before the full backup.
以上列舉了三種典型原因所導致同步失敗的快速處理方法,如果經上述方法自動處理之後可以直接繼續進行同步處理,則可以避免使用完全拷貝方式,從而進一步提高配置庫的備份效率。如果在進行相應的錯誤處理後,仍然同步操作失敗,則可以確定當前版本為不可同步版本,需要進一步執行S103。The above describes the fast processing method of the synchronization failure caused by three typical reasons. If the synchronization process can be directly continued after the above method is automatically processed, the full copy mode can be avoided, thereby further improving the backup efficiency of the configuration library. If the synchronization operation still fails after the corresponding error processing, it can be determined that the current version is an unsynchronizable version, and further execution of S103 is required.
當然,導致同步失敗的原因可能是多種多樣的,一方面,能夠快速處理的錯誤也不僅限於以上三類,本領域技術人員可以根據實際情況添加其他的快速錯誤處理機制;另一方面,對於無法快速處理的錯誤,甚至是不清楚原因的錯誤,也可以直接根據錯誤資訊,確定當前版本為不可同步版本,然後進一步執行S103。Of course, the reasons for the failure of the synchronization may be various. On the one hand, the errors that can be quickly processed are not limited to the above three categories, and those skilled in the art may add other fast error handling mechanisms according to actual conditions; Quickly processing errors, even errors that are unclear, can also directly determine the current version as an unsynchronizable version based on the error information, and then further execute S103.
相應於上面的方法實施例,本申請還提供一種Subversion配置庫的備份裝置,參見圖2所示,包括:同步單元210,用於根據備份配置庫的版本屬性,執行配置庫同步操作;同步成功處理單元220,用於在同步操作成功時,將預先設置的備份配置庫的版本屬性值更新為本次成功同步的版本標識;其中,該預先設置的版本屬性用於記錄備份配置庫中最後一個版本的標識;同步失敗處理單元230,用於在同步操作失敗時,在確定當前版本為不可同步版本之後,通過完全拷貝方式對源配置庫進行備份,並且將備份配置庫的版本屬性值更新為該不可同步版本的標識。Corresponding to the above method embodiment, the application further provides a backup device of the Subversion configuration library. As shown in FIG. 2, the method includes: a synchronization unit 210, configured to perform a configuration library synchronization operation according to a version attribute of the backup configuration library; The processing unit 220 is configured to: when the synchronization operation succeeds, update the version attribute value of the preset backup configuration repository to the version identifier of the successful synchronization; wherein the preset version attribute is used to record the last one in the backup configuration database. The identifier of the version; the synchronization failure processing unit 230 is configured to: when the synchronization operation fails, after the current version is determined to be an unsynchronizable version, the source configuration library is backed up by the full copy mode, and the version attribute value of the backup configuration library is updated to The identifier of the non-synchronizable version.
應用上述提供的Subversion配置庫備份裝置,無需對備份配置庫進行初始化,通過直接為備份配置庫設置版本屬性,可以在同步操作無法正確進行時,通過拷貝的方式進行備份,然後通過修改備份配置庫的版本屬性,使得同步操作可以在當前拷貝備份的基礎上繼續進行。Applying the Subversion configuration repository backup device provided above does not require initializing the backup configuration repository. By directly setting the version attribute for the backup configuration repository, you can back up by copying when the synchronization operation cannot be performed correctly, and then modify the backup configuration repository. The version attribute allows the synchronization operation to continue on the basis of the current copy backup.
參見圖3所示,本申請所提供的Subversion配置庫備份裝置置還可以包括:不可同步版本確定單元240,該單元具體可以包括:錯誤資訊獲取子單元,用於獲取同步操作失敗的錯誤資訊;第一確定子單元,用於根據錯誤資訊,確定當前版本為不可同步版本;錯誤處理子單元,用於根據錯誤資訊進行相應的錯誤處理;第二確定子單元,用於在進行錯誤處理後仍然同步操作失敗時,確定當前版本為不可同步版本。As shown in FIG. 3, the Subversion configuration repository backup device provided by the present application may further include: a non-synchronized version determining unit 240, where the unit may specifically include: an error information obtaining subunit, configured to obtain error information that the synchronization operation fails; a first determining subunit, configured to determine, according to the error information, that the current version is an unsynchronized version; an error processing subunit, configured to perform corresponding error processing according to the error information; and a second determining subunit, configured to perform error processing When the synchronization operation fails, it is determined that the current version is an unsynchronized version.
其中,當錯誤資訊為:備份配置庫鎖定,則該錯誤處理子單元刪除備份配置庫的同步鎖定屬性。Wherein, when the error information is: backup configuration library lock, the error processing sub-unit deletes the synchronization lock attribute of the backup configuration library.
當錯誤資訊為:備份配置庫的某個檔鎖定,則該錯誤處理子單元刪除該檔的鎖定屬性。When the error message is: a file lock of the backup configuration library, the error handling subunit deletes the lock attribute of the file.
當錯誤資訊為:備份配置庫最後一個版本錯誤,則該錯誤處理子單元刪除備份配置庫中最後一個版本,並且將備份配置庫的版本屬性值修改為該最後一個版本的前一個版本的標識。When the error message is: The last version of the backup configuration repository is incorrect, the error handling subunit deletes the last version in the backup configuration repository and modifies the version attribute value of the backup configuration repository to the identity of the previous version of the last version.
上述裝置中的不可同步版本確定單元240,可以針對一些特定的同步失敗原因,進行相應的自動處理方法,如果自動處理之後可以直接繼續進行同步處理,則可以避免使用完全拷貝方式,從而進一步提高配置庫的備份效率。The non-synchronized version determining unit 240 in the foregoing apparatus may perform a corresponding automatic processing method for some specific synchronization failure reasons. If the synchronization processing can be directly continued after the automatic processing, the full copy mode may be avoided, thereby further improving the configuration. Library backup efficiency.
為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本申請時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of each unit can be implemented in the same software or software and/or hardware in the implementation of the present application.
通過以上的實施方式的描述可知,本領域的技術人員可以清楚地瞭解到本申請可借助軟體加必需的通用硬體平臺的方式來實現。基於這樣的理解,本申請的技術方案本質上或者說對現有技術做出貢獻的部分可以以軟體產品的形式體現出來,該電腦軟體產品可以儲存在儲存媒體中,如ROM/RAM、磁碟、光碟等,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)執行本申請各個實施例或者實施例的某些部分所述的方法。As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of a software plus a necessary universal hardware platform. Based on such understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in the form of a software product, which can be stored in a storage medium such as a ROM/RAM, a disk, A disc or the like includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.
本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於裝置實施例而言,由於其基本相似於方法實施例,所以描述得比較簡單,相關之處參見方法實施例的部分說明即可。以上所描述的裝置實施例僅僅是示意性的,其中該作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部模組來實現本實施例方案的目的。本領域普通技術人員在不付出創造性勞動的情況下,即可以理解並實施。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located in one Places, or they can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
本申請可用於眾多通用或專用的計算系統環境或配置中。例如:個人電腦、伺服器電腦、手持設備或可擕式設備、平板型設備、多處理器系統、基於微處理器的系統、置頂盒、可編程的消費電子設備、網路PC、小型電腦、大型電腦、包括以上任何系統或設備的分散式計算環境等等。This application can be used in a variety of general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, small computers, Large computers, decentralized computing environments including any of the above systems or devices, and more.
本申請可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、元件、資料結構等等。也可以在分散式計算環境中實踐本申請,在這些分散式計算環境中,由通過通信網路而被連接的遠端處理設備來執行任務。在分散式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠端電腦儲存媒體中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, a program module includes routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
以上所述僅是本申請的具體實施方式,應當指出,對於本技術領域的普通技術人員來說,在不脫離本申請原理的前提下,還可以做出若干改進和潤飾,這些改進和潤飾也應視為本申請的保護範圍。The above description is only a specific embodiment of the present application, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present application. It should be considered as the scope of protection of this application.
210...同步單元210. . . Synchronization unit
220...同步成功處理單元220. . . Synchronous successful processing unit
230...同步失敗處理單元230. . . Synchronization failure processing unit
240...不可同步版本確定單元240. . . Non-synchronizable version determination unit
為了更清楚地說明本申請實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請中記載的一些實施例,對於本領域普通技術人員來講,還可以根據這些附圖獲得其他的附圖。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only Some of the embodiments described in the application can be obtained by those skilled in the art from the drawings.
圖1為本申請實施例的Subversion配置庫備份方法流程圖;FIG. 1 is a flowchart of a method for backing up a Subversion configuration library according to an embodiment of the present application;
圖2為本申請實施例的Subversion配置庫備份裝置的結構示意圖;2 is a schematic structural diagram of a Subversion configuration library backup apparatus according to an embodiment of the present application;
圖3為本申請實施例的Subversion配置庫備份裝置的另一種結構示意圖。FIG. 3 is another schematic structural diagram of a Subversion configuration library backup apparatus according to an embodiment of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW099115479A TWI486759B (en) | 2010-05-14 | 2010-05-14 | Subversion configuration library backup method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW099115479A TWI486759B (en) | 2010-05-14 | 2010-05-14 | Subversion configuration library backup method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201140310A TW201140310A (en) | 2011-11-16 |
| TWI486759B true TWI486759B (en) | 2015-06-01 |
Family
ID=46760259
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW099115479A TWI486759B (en) | 2010-05-14 | 2010-05-14 | Subversion configuration library backup method and device |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI486759B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200630886A (en) * | 2005-02-28 | 2006-09-01 | Microsoft Corp | File system represented inside a database |
| TWI265410B (en) * | 2004-04-23 | 2006-11-01 | Taiwan Semiconductor Mfg | System and method for real-time fault detection, classification, and correction in a semiconductor manufacturing environment |
| TW200809626A (en) * | 2006-04-17 | 2008-02-16 | Microsoft Corp | Creating host-level application-consistent backups of virtual machines |
| US20090049065A1 (en) * | 2007-08-17 | 2009-02-19 | Salesforce.Com, Inc. | On-demand database service system, method, and computer program product for validating a developed application |
-
2010
- 2010-05-14 TW TW099115479A patent/TWI486759B/en not_active IP Right Cessation
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI265410B (en) * | 2004-04-23 | 2006-11-01 | Taiwan Semiconductor Mfg | System and method for real-time fault detection, classification, and correction in a semiconductor manufacturing environment |
| TW200630886A (en) * | 2005-02-28 | 2006-09-01 | Microsoft Corp | File system represented inside a database |
| TW200809626A (en) * | 2006-04-17 | 2008-02-16 | Microsoft Corp | Creating host-level application-consistent backups of virtual machines |
| US20090049065A1 (en) * | 2007-08-17 | 2009-02-19 | Salesforce.Com, Inc. | On-demand database service system, method, and computer program product for validating a developed application |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201140310A (en) | 2011-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11720456B2 (en) | Automatic configuration of a recovery service | |
| US20230023262A1 (en) | System and method for supporting patching in a multitenant application server environment | |
| CN111124755B (en) | Fault recovery method and device for cluster nodes, electronic equipment and storage medium | |
| CN108805570B (en) | Data processing method, device and storage medium | |
| US9934107B1 (en) | Designating backup nodes and backing up in parallel in a high-availability environment | |
| JP6748638B2 (en) | System and method for supporting patching in a multi-tenant application server environment | |
| KR102047216B1 (en) | Replaying jobs at a secondary location of a service | |
| CN103473277B (en) | The Snapshot Method and device of file system | |
| US20150213100A1 (en) | Data synchronization method and system | |
| US8612799B2 (en) | Method and apparatus of backing up subversion repository | |
| US20120030513A1 (en) | Mechanism to Provide Assured Recovery for Distributed Application | |
| TW201306632A (en) | Recovery service location for a service | |
| TW201801495A (en) | Data processing method and device | |
| US20180367441A1 (en) | Routing table synchronization method, apparatus, and system | |
| CN113986450B (en) | Virtual machine backup method and device | |
| CN103970834A (en) | Recovery method for incremental data synchronization fault in isomerous database synchronizing system | |
| CN108958971A (en) | Information backup method, device and equipment | |
| CN105550230A (en) | Method and device for detecting failure of node of distributed storage system | |
| US20180246648A1 (en) | Continuous disaster protection for migrated volumes of data | |
| JP5862246B2 (en) | Data management program, data management method, and storage apparatus | |
| TWI486759B (en) | Subversion configuration library backup method and device | |
| CN117112690A (en) | Distributed cluster data synchronization method and related equipment | |
| CN116775219A (en) | Service starting method, device, equipment and storage medium | |
| CN108259613B (en) | Disaster recovery data online synchronization device, method and computer readable storage medium | |
| CN115297129B (en) | Method and device for establishing data communication network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |