Fran Roberts's picture

Hi there,

I have a batch file that runs every evening to back up all databases, and do a reorg and systemdb backup.  The Reorg command however will not work correctly when it runs from the batch file, the other commands work correctly (backup etc.).  I have also executed "reorg all" on the server administrator tool and there it works correctly.  Please can anyone help?

 

echo.|date|find "current" >t#e.bat
echo set date=%%5> the.bat
call t#e.bat
del t?e.bat > nul


set test=%date%
set newtest=%date:/=-%

set mm=%date:~5,2%

set dd=%date:~8,2%
set yyyy=%date:~0,4%

set BATCH_DATE=%yyyy%-%mm%-%dd%
SET BACKUPFOLDER=C:\ArisBackup
SET SERVER=*************
SET ARISPATH=C:\SoftwareAG\ARIS9.8
SET USERNAME=system
SET PASSWORD=************
SET PORT=80
SET TENANT=default


cd /d %BACKUPFOLDER%
md %BATCH_DATE%
SET BACKUPDIR=%BACKUPFOLDER%\%BATCH_DATE%
SET ARISDIR="%ARISPATH%\javaclient"  
SET LOGFILE="%BACKUPDIR%\arisbackup.log"
SET CFGLOG="%BACKUPDIR%\ariscfgbackup.log"
set path = %path%;%ARISPATH%\tools\ArisAdm

cd /d %ARISPATH%\tools\ArisAdm

arisadm90 -l %LOGFILE% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% backup all %BACKUPDIR%
arisadm90 -l %CFGLOG% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% backupsystemdb "%BACKUPDIR%"
arisadm90 -l %CFGLOG% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% reorg all "%BACKUPDIR%"

cd /d %ARISPATH%\tools\scriptrunner
scriptrunner.bat DeleteModels.cfg

 

I get this error in my logfile for the reorg of databases:

[01/06/2017 12:40:55] ArisAdm -l C:\ArisBackup\2017-06-01\ariscfgbackup.log -s zabrysvisarapp:80 -t -u backupsystemdb C:\ArisBackup\2017-06-01
[01/06/2017 12:40:56] (backupsystemdb C:\ArisBackup\2017-06-01 )
[01/06/2017 12:41:07] OK
[01/06/2017 12:41:09] ArisAdm -l C:\ArisBackup\2017-06-01\ariscfgbackup.log -s zabrysvisarapp:80 -t -u reorg all C:\ArisBackup\2017-06-01
[01/06/2017 12:41:10] (reorg all C:\ArisBackup\2017-06-01 )
[01/06/2017 12:41:10] reorganizing WIP<aris>
[01/06/2017 12:41:10] Error: Unknown command