How i can do SVN Repositories Backup step by step.... i want to backup the Repositories itself .... i don't want to backup it as folder ....
step 1 Create a script or batch file that runs the command
svnadmin is a program that comes with svn it will be in the bin folder
backupfile is the file that the repository will get dumped to
REPOS_PATH is the location of the repository
see http://svnbook.red-bean.com/en/1.1/re31.html for more details
step 2. Run the script/batch file to test the backup.
step 3. Test that the backup works by running the command
Now try out the repository created in test_path to make sure it works ok - it should and as a bonus it should work with newer versions of svn.
Just create a copy of the svn directory.
As already mentioned - you need to stop the svn server first.
You need to stop apache and ssh too, if you use them to access your repo.
You can restore on the same machine, or a similar one (eg windows -> windows). if you want to restore from Windows to Linux (say) then you'll want to dump and load the repository instead. You'll still need to copy the rest of the directory as well.
Suggestions to use rsync to copy everything is a good one (but you;ll have to stop the server to always get a good backup), or use svnsync which is an excellent incremental backup utility for SVN. (you'll still have to copy the hooks and config as well though - I rsync those and svnsync the repo)
Following a script that you can save as : svnbackup.sh