SVN: Difference between revisions
m Text replacement - "<code>" to "{{code|" |
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux" |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
To back up a specific range of revisions: | To back up a specific range of revisions: | ||
svnadmin dump /path/to/repository -r startRev:endRev > backup.dump | svnadmin dump /path/to/repository -r startRev:endRev > backup.dump | ||
where {{code|startRev | where {{code|startRev}} is the starting revision number and {{code|endRev}} the ending revision number. You may replace {{code|endRev}} with {{code|HEAD}} to specify the most recent revision. | ||
== Restore Repository == | == Restore Repository == | ||
| Line 17: | Line 17: | ||
service svnsersve start | service svnsersve start | ||
To configure {{code|svnserve | To configure {{code|svnserve}}, you will need two files in your repository's {{code|conf/}} directory: | ||
{{code|svnserve.conf: | {{code|svnserve.conf:}} | ||
<syntaxhighlight lang="text" line start="1" enclose="div"> | <syntaxhighlight lang="text" line start="1" enclose="div"> | ||
[general] | [general] | ||
| Line 43: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{code|passwd: | {{code|passwd:}} (as defined above in {{code|password-db}}) | ||
<syntaxhighlight lang="text" line start="1" enclose="div"> | <syntaxhighlight lang="text" line start="1" enclose="div"> | ||
| Line 54: | Line 54: | ||
<nowiki>svn://server/<path_to_repository></nowiki> | <nowiki>svn://server/<path_to_repository></nowiki> | ||
For example, if my repository was placed in {{code|/home/leo/repository/project_v1 | For example, if my repository was placed in {{code|/home/leo/repository/project_v1}}, you should be able to checkout and commit at: | ||
<nowiki>svn://server/home/leo/repository/project_v1</nowiki> | <nowiki>svn://server/home/leo/repository/project_v1</nowiki> | ||
If you have defined your {{code|svnserve.conf | If you have defined your {{code|svnserve.conf}} properly, you will be prompted for a username/password. | ||
[[Category:Linux]] | {{Navbox Linux}}[[Category:Linux]] | ||
{{Navbox Services}} | {{Navbox Services}} | ||
Latest revision as of 06:21, 1 September 2019
Backup Repository
Backing up the entire repository from beginning of time to the most recent revision:
svnadmin dump /path/to/repository > backup.dump
To back up a specific range of revisions:
svnadmin dump /path/to/repository -r startRev:endRev > backup.dump
where startRev is the starting revision number and endRev the ending revision number. You may replace endRev with HEAD to specify the most recent revision.
Restore Repository
svnadmin create /path/to/repository svnadmin load /path/to/repository < backup.dump
Setting up svnserve
To set up svnserve under CentOS/ScientificLinux, run:
yum install subversion service svnsersve start
To configure svnserve, you will need two files in your repository's conf/ directory:
svnserve.conf:
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
realm = Project Version 1.0 Repository
passwd: (as defined above in password-db)
[users]
leo = meinpasswort
Accessing Your Repository
You can now access your repository at:
svn://server/<path_to_repository>
For example, if my repository was placed in /home/leo/repository/project_v1, you should be able to checkout and commit at:
svn://server/home/leo/repository/project_v1
If you have defined your svnserve.conf properly, you will be prompted for a username/password.
| ||||||