Setting Up a Repository
Harry
· 13 Sep 2026
· 1 views
Create the Repository
sudo mkdir -p /srv/svn
sudo svnadmin create /srv/svn/projectThe svnadmin create command builds the repository directory with all metadata, hooks and configuration inside it.
Standard Layout
Adopt the trunk/branches/tags convention from day one:
project/
trunk/ # main line of development
branches/ # feature and release branches
tags/ # snapshotsServe It
The simplest server is svnserve on the default port 3690:
svnserve -d -r /srv/svn
# checkout from another machine:
svn checkout svn://server/project/trunk project-checkoutAccess Control
The conf/svnserve.conf file sets the authz rules; conf/passwd holds users:
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authzBackup the Repository
svnadmin dump gives a portable full backup:
svnadmin dump /srv/svn/project > project.dumpRestore with svnadmin load into a fresh repository.
Key Points
- svnadmin create builds the repository skeleton.
- Use trunk/branches/tags from the start.
- svnserve shares repositories over the network.
- authz files control who reads and writes what.