|
svnadmin hotcopy在命令行执行时,提示不是内部或外部命令,也不是可运行的程序或批处理文件
根据网上搜索的资料,备份SVN,写了两个backup.bat,simplebackup.bat批处理文件备份,执行后没有成功备份,然后在命令行输入备份svnadmin hotcopy就提示错误,是不是备份不成功,是这个命令不执行成功的原因吗,表高手赐教。
backup.bat
echo off
#rem Subversion的安装目录
set SVN_HOME="C:\Program Files (x86)\VisualSVN Server"
#rem 所有版本库的父目录
set SVN_ROOT=E:\Repositories\
#rem 备份的目录
set BACKUP_SVN_ROOT=F:\Repositories_back
set BACKUP_DIRECTORY=%BACKUP_SVN_ROOT%\%date:~0,10%
if exist %BACKUP_DIRECTORY% goto checkBack
:startBack
echo 建立备份目录%BACKUP_DIRECTORY%>>% BACKUP_SVN_ROOT %/backup.log
mkdir %BACKUP_DIRECTORY%
#rem 验证目录是否为版本库,如果是则取出名称备份
for /r %SVN_ROOT% %%I in (.) do @if exist "%%I\conf\svnserve.conf" %SVN_ROOT%\Simplebackup.bat "%%~fI" %%~nI
goto end
:checkBack
rd /s /q %BACKUP_DIRECTORY%
goto startBack
:end
simplebackup.bat
@echo 正在备份版本库%1......
@%SVN_HOME%\bin\svnadmin hotcopy %1 %BACKUP_DIRECTORY%\%2
@echo 版本库%1成功备份到了%2!
goto clean
:clean
del /Q %BACKUP_SVN_ROOT%\ModifiedBackup\*.dump
goto end
:end |
|