< Day Day Up > |
svnadmin is the administrative tool for monitoring and repairing your Subversion repository. 15.5.1. svnadmin Options
15.5.2. svnadmin SubcommandsThe svnadmin command creates and administers the repository. As such, it always operates on local paths, not on URLs.
svnadmin create repos_path Create a new, empty repository at the path provided. If the provided directory does not exist, it is created for you. Options
ExampleCreating a new repository is just this easy: $ svnadmin create /usr/local/svn/repos
svnadmin deltify [-r lower[:upper]] repos_path svnadmin deltify exists in 1.0.x only due to historical reasons. This command is deprecated and no longer needed. It dates from a time when Subversion offered administrators greater control over compression strategies in the repository. This turned out to be a lot of complexity for very little gain, and this "feature" was deprecated. Options
svnadmin dump repos_path [-r lower[:upper]] [--incremental] Dump the contents of filesystem to standard output in a "dumpfile" portable format, sending feedback to standard error. Dump revisions lower rev through upper rev. If no revisions are given, dump all revision trees. If only lower is given, dump that one revision tree. Options
ExamplesDump your whole repository: $ svnadmin dump /usr/local/svn/repos SVN-fs-dump-format-version: 1 Revision-number: 0 * Dumped revision 0. Prop-content-length: 56 Content-length: 56 ... Incrementally dump a single transaction from your repository: $ svnadmin dump /usr/local/svn/repos -r 21 --incremental * Dumped revision 21. SVN-fs-dump-format-version: 1 Revision-number: 21 Prop-content-length: 101 Content-length: 101 ...
svnadmin help [subcommand ...] Provide a quick usage summary. With subcommand, provide information about the given subcommand.
svnadmin hotcopy old_repos_path new_repos_path This subcommand makes a full "hot" backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the --clean-logs option, svnadmin performs a hotcopy of your repository, and then removes unused Berkeley DB logs from the original repository. You can run this command at any time and make a safe copy of the repository, regardless of whether other processes are using the repository. Options
svnadmin list-dblogs repos_path List Berkeley DB log files. Berkeley DB creates logs of all changes to the repository, allowing the repository to recover in the face of catastrophe. Unless you enable DB_LOGS_AUTOREMOVE, the log files accumulate, although most are no longer used and can be deleted to reclaim disk space.
svnadmin list-unused-dblogs repos_path List unused Berkeley DB log files (see svnadmin list-dblogs). ExampleRemove all unused log files from a repository: $ svnadmin list-unused-dblogs /path/to/repos | xargs rm ## disk space reclaimed!
svnadmin load repos_path Read a "dumpfile"-formatted stream from standard input, committing new revisions into the repository's filesystem. Send progress feedback to standard output. Options
ExamplesThis shows the beginning of loading a repository from a backup file (made, of course, with svn dump): $ svnadmin load /usr/local/svn/restored < repos-backup <<< Started new txn, based on original revision 1 * adding path : test ... done. * adding path : test/a ... done. ... Or, to load into a subdirectory: $ svnadmin load --parent-dir new/subdir/for/project \ > /usr/local/svn/restored < repos-backup <<< Started new txn, based on original revision 1 * adding path : test ... done. * adding path : test/a ... done. ...
svnadmin lstxns repos_path Print the names of all uncommitted transactions.
svnadmin recover repos_path Run this command if you get an error indicating that your repository needs to be recovered.
svnadmin rmtxns repos_path txn_name ... Delete outstanding transactions from a repository. Options
ExamplesRemove all uncommitted transactions from your repository, using svn lstxns to provide the list of transactions to remove: $ svnadmin rmtxns /usr/local/svn/repos/ \ > 'svnadmin lstxns /usr/local/svn/repos/'
svnadmin setlog repos_path -r revision file Set the log message on revision revision to the contents of file. This is similar to using svn propset --revprop to set the svn:log property on a revision, except you can also use the option --bypass-hooks to avoid running any pre- or post-commit hooks, which is useful if the modification of revision properties has not been enabled in the pre-revprop-change hook.
Options
ExampleSet the log message for revision 19 to the contents of the file msg: $ svnadmin setlog /usr/local/svn/repos/ -r 19 msg
svnadmin verify repos_path Run this command to verify the integrity of your repository. This iterates through all revisions in the repository by internally dumping all revisions and discarding the output. |
< Day Day Up > |