← 返回命令列表

Linux command

svnadmin 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a new repository

svnadmin create [/path/to/repo]

Dump repository to file

svnadmin dump [/path/to/repo] > [backup.dump]

Load dump into repository

svnadmin load [/path/to/repo] < [backup.dump]

Verify repository integrity

svnadmin verify [/path/to/repo]

List outstanding transactions

svnadmin lstxns [/path/to/repo]

Remove a dead transaction

svnadmin rmtxns [/path/to/repo] [txn-id]

Upgrade repository format

svnadmin upgrade [/path/to/repo]

Show repository info

svnadmin info [/path/to/repo]

说明

svnadmin is the administrative tool for Subversion repositories. It provides commands for creating, maintaining, and backing up repositories stored on the local filesystem. The tool can create repositories with either FSFS (default) or Berkeley DB backends. It supports full and incremental dumps for backup and migration, with optional delta compression for smaller dump files. Repository maintenance includes integrity verification, crash recovery, format upgrades, and transaction cleanup. The hotcopy command creates consistent backups without stopping repository access. Unlike the svn client, svnadmin operates only on local repository paths and cannot access repositories over the network.

参数

--revision _rev_, -r _rev_
Specify revision or revision range.
--incremental
Dump only changes since previous revision.
--deltas
Use deltas in dump output for smaller files.
--fs-type _type_
Filesystem type for new repos: fsfs or bdb.
--force-uuid
Set repository UUID from dump stream.
--ignore-uuid
Ignore UUID in dump stream.
--quiet, -q
Suppress normal output.
--wait
Wait for repository lock instead of failing.
--config-dir _dir_
Use alternate config directory.
--pre-1.4-compatible
Create repository compatible with Subversion 1.4 or older.
--pre-1.6-compatible
Create repository compatible with Subversion 1.6 or older.
--compatible-version _ver_
Create repository compatible with specified Subversion version.
--bypass-hooks
Skip hook scripts during load.
--bypass-prop-validation
Skip property validation during load.

FAQ

What is the svnadmin command used for?

svnadmin is the administrative tool for Subversion repositories. It provides commands for creating, maintaining, and backing up repositories stored on the local filesystem. The tool can create repositories with either FSFS (default) or Berkeley DB backends. It supports full and incremental dumps for backup and migration, with optional delta compression for smaller dump files. Repository maintenance includes integrity verification, crash recovery, format upgrades, and transaction cleanup. The hotcopy command creates consistent backups without stopping repository access. Unlike the svn client, svnadmin operates only on local repository paths and cannot access repositories over the network.

How do I run a basic svnadmin example?

Run `svnadmin create [/path/to/repo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --revision _rev_, -r _rev_ do in svnadmin?

Specify revision or revision range.