开发者

Subversion: hotcopy into the same directory?

开发者 https://www.devze.com 2023-01-20 23:01 出处:网络
How to take svnadmin hotcopy into the same directory 开发者_如何学JAVA(eg. when this command is in the scheduled tasks)?

How to take svnadmin hotcopy into the same directory 开发者_如何学JAVA(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
   panic!!
}

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消