Automated backup

This step by step guide outlines the major steps to take to created an automated backup solution for Ozeki NG SMS Gateway. Backing up the system involves copying the contents of the Ozeki NG directory

Step 1 - Create a backup directory

It is best to create a directory name that does not contain any spaces. The following directory name is a good choice:

mkdir C:\backup

Step 2 - Create a batch file that will do the backup for you

To create an automated backup procedure a dos batch file should be created. In this batch file the first thing to do is to stop the Ozeki NG service. This can be performed by issuing the net stop command. After the service has been stopped, the contents of the Ozeki NG directory should be copied to the backup directory. A new backup directory should be created for each day. The name of the backup directory can be the date itself. You can use the following DOS command to create the directory name:

FOR /F "tokens=2,3,4 delims=/- " %a in ("%DATE%") do set CDATE=%c%a%b

After the file copy has been done, you can start the service again by issuing the net start command. To put this all into a batch file you should create something like this:

C:\backup\backup.bat
net stop OzekiNG
FOR /F "tokens=2,3,4 delims=/- " %%a in ("%DATE%") do set CDATE=%%c%%a%%b
set DESTDIR=C:\backup\%CDATE%
mkdir %DESTDIR%
xcopy /E "C:\Program Files\Ozeki\OzekiNG - SMS Gateway" %DESTDIR%
net start OzekiNG

Step 3 - Use windows task scheduler to schedule a daily job

After you have created the batch file, you can use the windows task scheduler to execute it at the end of each day.

Learn more about the Ozeki SMS Software
People who read this also read...

More information