Question
· Aug 8

Cold Backup via Batchfile on Windows Server

Hey,

since our instance of iris is just utilized during working hours, I would like to simply copy all data via FTP from the server to a NAS during the night.

Are there reasons against this approach?

Are there batch examples of how to stop and start the database?

 

Thank you in advance!

Erik

Product version: IRIS 2024.1
Discussion (3)2
Log in or sign up to continue

Cold backup is one of the options documented in the Data Integrity Guide.

But a lot depends on what you mean by "all data" -- don't forget installation files, license key, journals, any stream files you may have, and on Windows remember that installation puts some keys in the Registry.  How much of this you'll need to restore depends on the kind of trouble you encounter.  For example, if you want to restore a database, but the instance is otherwise healthy, the Registry is likely in working order, but if the entire server is destroyed, you have a more complicated recovery.

If you need to be able to bring the instance back to its latest state (roll-forward recovery), you'll need journal files that won't exist at the time you take the backup so you may want to backup journal files separately during the working hours.

It would be a good idea to protect your installation .EXE file as well, so that you can install a fresh copy of the exact version you use.  Down the road, that version might no longer be available from the WRC.

Take care to preserve the correct ownership and permissions on files so they are correct when they are restored from NAS.

Your account team can be a good resource.

Hey,

thanks for the commet Erik (btw. great name ;) )  !

I think in general I have to admit that we are talking about a relative small office using a software which is using IRIS. Obviously having a perfekt "backup and restore strategy" would be wonderfull but we also have to leverage a bit the effort to create the perfekt strategy and to restore from a not so perfekt strategy.

So my personal answer to my own question is to copy the two directorys I got told to backup to be able to get the software running again ;)

Not sure wheather there is someone in this forum who is interested in this but find below my batchfile:

:: ------------- Set Path
:: - example path!!!
set PATH=%PATH%;C:\Program Files (x86)\WinSCP\
set PATH=%PATH%;c:\CacheSys\bin\

:: ------------ Generate Timestamp 
for /f "delims=" %%a in ('wmic OS get localdatetime  ^| find "."') do set datetime=%%a

set "YYYY=%datetime:~0,4%"
set "MM=%datetime:~4,2%"
set "DD=%datetime:~6,2%"
set "HH=%datetime:~8,2%"
set "MI=%datetime:~10,2%"
set "SS=%datetime:~12,2%"

set fullstamp=%YYYY%-%MM%-%DD%-%HH%-%MI%-%SS%

:: ------------ Stop IRIS
iris stop IRISHEALTH

:: ------------ Start FTP Upload 
::Create directory for ftp upload
mkdir C:\WinSCP_Logs\%fullstamp%\ 

:: Exec FTP client and ipload file
winscp.com /log="C:\WinSCP_Logs\%fullstamp%\logfile.log"^
    /command ^
    "open ftp://User:Password@serveraddress" ^
    "put [src] [dest]%fullstamp%"^
   "exit"


:: ------------ start Iris 
iris start IRISHEALTH