This article will introduce you to a quick reconstruction method for SVN database backup of major versions. If you need it, go to the reference page.
Generally, the svn repository is a real-time backup warehouse with svnsync configured, And the slave database is copied from one version of the master database to one version. However, if the master database already has version 100,000, to use simple svnsync init to create a new backup warehouse and start sync from version 0, the time required cannot be estimated.
To quickly recreate the backup, you can use the following method to handle it:
1. First copy the hotcopy of the master database
Svnadmin hotcopy reponame-bak
2. Synchronize the hot backup to the backup
Rsync-avz reponame-bak username @ bakserver:/svnroot-path
3. Add the svn permission for modifying the slave database on the slave machine.
4. Set synchronization properties for the slave Database
# Set the uuid of the master database
Svn ps svn: sync-from-uuid of the master database -- revprop-r 0 http: // bakserver/repo/reponame
# Set the url of the master database
Svn ps svn: sync-from-url http: // masterserver/repo/reponame -- revprop-r 0 http: // bakserver/repo/reponame
# Set the latest version of hot standby
Lastver = 'svnlook youngest reponame-Bak'
Svn ps svn: sync-last-merged-rev $ lastver -- revprop-r 0 http: // bakserver/repo/reponame
5. New versions submitted after hotcopy Synchronization
Svnsync sync http: // bakserver/repo/reponame