views:

1476

answers:

2

I am trying to automatically backup my SVN Repository. This is in a batch file I wrote:

svnadmin hotcopy C:/myRepository G:/myRepositoryBackup --clean-logs

It works great the first time. However, each time after that, I get this error:

svnadmin: 'G:/myRepositoryBackup' exists and is non-empty

How do I have it overwrite my old data, or copy incrementally?

I know I can just use svnadmin dump but I want the smaller hotcopy output.

+4  A: 

You can use svnadmin dump repo --incremental.

You can find more repository backup info here:

SVNBook -> Chapter 5. Repository Administration -> Repository Backup

CMS
+2  A: 

What I do for SVN backups is use svnadmin dump and then compress the output with 7-Zip. For my repository, this ends up being smaller than the hotcopy. Then I have a single file every day that contains the entire repository backup. Furthermore, the dump output is more robust in the face of future repository format changes (the hotcopy output can only be restored to exactly the same SVN version).

Greg Hewgill