How do I make an export (local backup) of my repository?
Exporting and backing up your repository with svnsync
You can easily make a local backup of your full repository with the svnsync tool.
The procedure is as follows:
- Find the URL for your repository. Here, we’ll assume the repository URL is https://svn.sliksvn.com/your_repo.
- Get the Subversion command-line client. On the command prompt, try typing svnsync If this command is not successful, install a Subversion client, such as SlikSVN for Windows.
- Create a Subversion repository on your local hard drive:
svnadmin create backup_repo
- You now have a backup_repo directory on your local system, containing an empty Subversion repository.
- Determine the URL for the backup repository. Here, we’ll assume the directory is /Users/name/backup_repo, so its URL is file:///Users/name/backup_repo. If you are using Windows, the URL will have the form of file:///C:/Users/name/backup_repo (containing forward slashes).
- If you use a Unix system, create a pre-revprop-change hook as follows:
echo '#!/bin/sh' > backup_repo/hooks/pre-revprop-change chmod 755 backup_repo/hooks/pre-revprop-change
- If you use a Windows system, create the pre-revprop-change hook like this:
echo > backup_repo\hooks\pre-revprop-change.bat
- Run the following command to initialize the sync:
svnsync init file:///Users/name/backup_repo https://svn.sliksvn.com/your_repo
- Run the following command to synchronize:
svnsync sync file:///Users/name/backup_repo
- You can always re-run the sync command later, in order to download the newest revisions from the remote.
- If you want to create a dump file, use:
svnadmin dump backup_repo > backup_repo.svn
More questions in this section
- What are your terms and conditions?
- How reliable is your network?
- How safe is my code with you?
- Can I import my existing SVN repository into my new account?
- Can I manage my repositories and users online?
- How do I upgrade my SVN hosting package?
- I have lost my password or account data!
- How do I connect to my repository?
- When do I get access to my repository?
- Resolving “Failed to get lock on destination repos” in svnsync
- Where is my data stored and processed?
- How do I make an export (local backup) of my repository?
- Do you keep and maintain backups?
- How do I downgrade my SVN hosting package?
- Can I change the name of my repository?