svn – Subversion: hotcopy into the same directory? – Education Career Blog

How to take svnadmin hotcopy into the same directory (eg. when this command is in the scheduled tasks)?

C:\>svnadmin hotcopy c:\temp\testrepo c:\temp\hotcopy_backup
C:\>svnadmin hotcopy c:\temp\testrepo c:\temp\hotcopy_backup
svnadmin: 'c:\temp\hotcopy_backup' exists and is non-empty

So what is the best practice, because simple overwrite does not seem to work?


rename the old c:\temp\hotcopy_backup to c:\temp\hotcopy_backup_old
create a new c:\temp\hotcopy_backup
svnadmin hotcopy c:\temp\testrepo c:\temp\hotcopy_backup
if no error{
   delete c:\temp\hotcopy_backup_old
} else {
   rename c:\temp\hotcopy_backup_old to c:\temp\hotcopy_backup

In fact it may be helpful, to create backups with a timestamp. So you can hold the last 2 or 3 backups, and every sunday’s backup.

May be you can create a backup, but you have to verify its readable.

Leave a Comment