You can automate this process with a batch script…
Please change sitename
, basepath
, and ncpath
to match your environment.
sitename: Your IIS site under which Novacura is running
basepath: Where you want your backups to go
ncpath: The full path to the Novacura directory within the data folder
@echo off
setlocal
set sitename=Default Web Site
set basepath=C:\Users\%username%\backups\Novacura
set ncpath=C:\Novacura\Data\Novacura Flow
goto adminchk
:adminchk
ECHO Checking permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
goto stopiis
) else (
goto elevate
)
goto end
:elevate
cls
ECHO Elevating permissions...
powershell -command "Start-Process cmd -ArgumentList '/c cd /d %CD% && %~nx0' -Verb runas"
goto end
:stopiis
ECHO Stopping IIS website...
%windir%\system32\inetsrv\appcmd stop site /site.name:"%sitename%"
ECHO[
goto backup
:backup
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (
set _date=%%c%%a%%b
)
for /f "tokens=1-4 delims=/:." %%a in ("%TIME%") do (
set _time=%%a%%b%%c
)
echo Backing up Novacura...
"C:\Program Files (x86)\Novacura\Flow Server Manager\NovaCura.Flow.Server.ExporterTool.exe" -e "%ncpath%" "%basepath%novacura_%_date%-%_time%.fzip" >NUL 2>&1
ECHO[
ECHO Starting IIS website...
%windir%\system32\inetsrv\appcmd start site /site.name:"%sitename%"
goto end
:end
endlocal