I would suggest that you take a full dump of the SVN repository once a week with the svn dump command, and incremental dump on a daily basis again with the svn dump command with incremental parameter. Again, its a good practice to load the dump from time to time in order to check the integrity of the dump and make sure that nothing is messed up.
What is the best practice of taking SVN backups?
What is the best practice of taking SVN backups, i.e. either through dumps using a script or copying the whole database using Windows System tools or any other good practice?
You can use "svn admin hotcopy" to take the backup.
It will save the configuration files and properties of the repository along with the data.
Also, it is fast and take less size than "svn dump"
Is there any other option for taking backup like for example going for replication of the database to another server?
You can go for "svn sync"
It will create a mirror of the repository wherever you want and then you can sync up your repos with the server repos.
Note: You can add this command in a script and can invoke it either on daily basis or on every commit with the help of hooks.
There are commercial products to provide an always on / always up to date copy of your repositories as well. With a failover agent / load balancer you can ensure extremely high SLAs.
Thanks for this information. Yes, I checked and find quite expensive packages but if we are quite confident about the integrity of our backups than I think there is no problem in purchasing too.
I used svn admin hotcopy to make backups of a repository, and the one time I had to restore, I simply copied that hotcopy straight off a DVD into my repositories folder, and voila, I had a working repository.
If you're looking for a cheap solution, you might combine a scheduled batch hotcopy with a cloud-based backup like Mozy.
Using the above code for DB Dump, can you tell me that a repository having a size of 5 GB, what should be the estimated size after taking DB Dump? If I say the DB Dump size is about 5.3 GB, i.e. more than the actual database size than how we can reduce its size, any possibility?
The dump is much larger than the actual database. However, compressing it using gzip cuts the size down by 1/5.
We have Subversion 1.8 and we do backup using a tool that do backup from filesystem directly.
I did not do using svn dump.
I think if I need to restore, it just to restore from backup the directory related to my repository.
Is it correct? Is there any problem if I do backup using this method since svn dump?