Section 15.2. svnadmin


15.2. svnadmin

The svnadmin program provides an interface for administrative tasks associated with the repository itself. It provides command-line tools for creating new repositories, maintaining repositories, and performing backups/migration of data.

Online help for each of svnadmin's subcommands can be obtained by running the program as: svnadmin help [COMMAND].

Options

  • --version

    Outputs version information about svnadmin.

Subcommands

The svnadmin commands (with alternate names in parenthesis) are

  • create

  • dump

  • help (?, h)

  • hotcopy

  • list-dblogs

  • list-unused-dblogs

  • load

  • lstxns

  • recover

  • rmtxns

  • setlog

  • verify

15.2.1. svnadmin create

This command creates a new repository.

Basic Usage
 $ svnadmin create --fs-type bdb REPOSITORY_NAME 

or

 $ svnadming create --fs-type fsfs REPOSITORY_NAME 

Options
  • --bdb-txn-nosync

    Cause the newly created repository to disable fsync when a transaction is being committed. This command is Berkeley DB specific, and does nothing when creating an FSFS repository.

  • --bdb-log-keep

    Tell a newly created repository to keep all of its logs, instead of periodically removing them. This command is Berkeley DB specific, and does nothing when creating an FSFS repository.

  • --config-dir arg

    Load the user configuration files from the directory pointed to by arg, instead of the default directory.

  • --fs-type arg (1.1 only)

    Tell svnadmin which type of repository backend to use when creating the repository. Currently, the valid values are bdb for a Berkeley DB backend and fsfs for a filesystem backend.

15.2.2. svnadmin dump

This command outputs the contents of a repository (or selected range or revisions), in a format that is portable across Subversion versions. This can be useful for creating backups of a repository, or when upgrading across major version changes (the only ones allowed to change the database format).

Basic Usage
 $ svnadmin dump REPOSITORY > REPOSITORY.dump 

Options
  • -r --revision] arg

    List the range of revisions to dump, in the form -r N:M where N is the lower revision and M is the upper revision.

  • --incremental

    Output the repository dump in a form that can be concatenated onto a previous dumpfile.

  • --deltas (1.1 only)

    Tell Subversion to output deltas for file changes, instead of the full file contents. This makes dumpfiles much smaller, at the cost of the dump's speed.

  • -q --quiet]

    Supply the minimum output possible.

15.2.3. svnadmin help (?, h)

This command outputs documentation for the svnadmin command. To get help on a specific subcommand, run help with the name of the command.

Basic Usage
 $ svnadmin help [COMMAND] 

Options

None

15.2.4. svnadmin hotcopy

This command makes a copy of a repository, without requiring exclusive access.

Basic Usage
 $ svnadmin hotcopy REPOSITORY REPOSITORY_BACKUP 

Options
  • --clean-logs

    Tell Subversion to remove any redundant log files from the repository when it is copied.

15.2.5. svnadmin list-dblogs

This command lists all of the log files associated with a Berkeley DB backend for the given repository. Be very careful though. You should never delete logfiles that are still in use (see svnadmin list-unused-dblogs).

This command only applies to Berkeley DB-based repositories.

Basic Usage
 $ svnadmin list-dblogs REPOSITORY 

Options

None

15.2.6. svnadmin list-unused-dblogs

This command lists all of the unused log files associated with a Berkeley DB backend for the given repository. Deleting these files does not harm your repository.

Basic Usage
 $ svnadmin list-unused-dblogs 

Options

None

15.2.7. svnadmin load

This command loads the contents of a dumpfile (created with svnadmin dump) into the given repository. If the repository already contains data, the data in the dumpfile is added as new revisions. If the repository is empty, the UUID of the repository is changed to match the UUID in the dumpfile.

Basic Usage
 $ cat OLD_REPOSITORY.dump | svnadmin load REPOSITORY 

Options
  • -q --quiet]

    Supply the minimum output possible.

  • --ignore-uuid

    Ignore any UUIDs provided by the input, and leave the UUID of the repository intact.

  • --force-uuid

    Force Subversion to set the repository's UUID to that found in the input, regardless of whether there is already data in the repository.

  • --parent-dir arg

    Use a specific directory in the repository as the base path for all data loaded in. This allows you to load a dumpfile in relative to somewhere other than the root directory.

15.2.8. svnadmin lstxns

This command lists all of the transactions currently in the repository, which have not yet been completely committed.

Basic Usage
 $ svnadmin lstxns REPOSITORY 

Options

None

15.2.9. svnadmin recover

This command runs a Berkeley DB recovery on the supplied repository. It only applies to a Berkeley DB-based repository, and does nothing on an FSFS repository. Make sure that you have exclusive access to the repository when this is run, as any other access during the recovery procedure could result in a corrupted repository. In Subversion 1.1 or later, if recover detects another process accessing the repository when it is run, it automatically exits.

Basic Usage
 $ svnadmin recover REPOSITORY 

Options
  • --wait (1.1 only)

    Don't exit if another process is accessing the repository. Instead, wait for it to exit.

15.2.10. svnadmin rmtxns

This command removes the given transaction(s) from the repository.

Basic Usage
 $ svnadmin rmtxns REPOSITORY TRANSACTION... 

Options
  • -q --quiet]

    Supply the minimum output possible.

15.2.11. svnadmin setlog

This command sets the log message for a given revision to the contents of the supplied file. This change is immediate and permanent. Because Subversion doesn't version revision properties, the old message is lost. This triggers any pre-revprop-change or post-revprop-change hook scripts.

Basic Usage
 $ svnadmin setlog REPOSITORY -r REVISION FILE 

Options
  • -r --revision] arg

    The revision that the log should be set on.

  • --bypass-hooks

    Tell Subversion not to execute any hook scripts when changing the property.

15.2.12. svnadmin verify

This command runs a verification procedure on the repository to check the integrity of the data contained therein.

Basic Usage
 $ svnadmin verify REPOSITORY 

Options

None



    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    ISBN: 131855182
    EAN: N/A
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net