Projekt

Allgemein

Profil

SVN16 » Historie » Version 2

Jeremias Keihsler, 12.01.2017 14:30

1 2 Jeremias Keihsler
h1. Backup/Restore SVN 1.6 repositories
2 1 Jeremias Keihsler
3
h2. Backup
4
5
The first thing you need when moving from one server to another is a dump of your subversion repository. Hopefully you are already creating dump's with a backup script, but if not here's how you can create a subversion dump file:
6
7
<pre><code class="bash">
8
svnadmin dump /path/to/repository > repo_name.svn_dump
9
</code></pre>
10
11
The dump file contains all the revisions you have ever made to your svn repository, so it will probably be quite large (it even includes files you may have deleted in a previous revision).
12
13
h2. Restore
14
15
Now, simply transfer the dump file on to your new subversion server, and create an empty repository:
16
17
<pre><code class="bash">
18
svnadmin create /path/to/repository
19
</code></pre>
20
21
Next import your dump file:
22
23
<pre><code class="bash">
24
svnadmin load /path/to/repository < repo_name.svn_dump
25
</code></pre>
26
27
You may want to force subversion to use the same UUID for the new repository as the old repository. To do this add @--force-uuid@ to your @svnadmin load@ command. In my case I wanted to do this. If you have already loaded your repository, there is a way to set the UUID at a later date, check the docs.
28
29
That's it, you now have a replica of your old repository on your new server.