
Using this agent, users can automate the SQL database backup
process. The SQL Backup and Restore agent is a console application. This
agent takes input from an ini file as described later in this page.
Note: This is a beta version.
Advantages of SQL Backup and
Restore Agent:
-
The
SQL Backup and Restore Agent is light weight.
-
Multiple
databases can be either backed up or restored in
one execution of the agent.
-
-
Multiple
databases can be either backed up or restored in
one execution of the agent.
How
to use this agent with Network/Unplugged
or Continuity@Work
In order to use this agent with Mobiliti products, please take the
following steps.
-
Install
the Mobiliti client software on the machine having
SQL server.
-
Execute
SQL Agent before synchronization to generate a backup
file (*.bak) of the database.
-
Complete
the synchronization process to backup this backup
file (*.bak) to any network location.
-
Execute
SQL Agent tool after synchronization to delete the
temporary backup file (*.bak) from client computer.
In
order to restore the backed up SQL Database, copy the latest backup file
(*.bak) to the SQL Server machine and then run this tool (manually) to restore
the database using that backup file.
To execute application before and after sync create the following
registry entries:
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecBeforeSyncModeSynchronous = 1 (DWORD)
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecuteApplicationBeforeSync =
C:\MOSQLBackupAgent.exe (string) (location of to agent exe on client machine)
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecuteApplicationBeforeSyncParameters
=
/b "c:\sqlmnuinit.ini" /l (string) (substitute c:\sqlmnuinit.ini with the location of ini file)
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecAfterSyncModeSynchronous = 1 (DWORD)
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecuteApplicationAfterSync =
C:\MOSQLBackupAgent.exe (string) (location of agent exe on client machine)
-
HK_Current_User\Software\Mobiliti\{Product Name}
\Preferences\ExecuteApplicationAfterSyncParameters =
/d "c:\sqlmnuinit.ini" /l(string) (substitute c:\sqlmnuinit.ini with the location of ini file)
Note: For optimum results over WAN or VPN, use Mobiliti software in
Client Server configuration and apply Block level differencing.
The behavior of the agent is decided
by the command line parameter sent to the agent as well
as the settings in the ini file. The general syntax
of required parameters is as follows:
MOSQLBackupAgent.exe /{Action} "ini
file complete name" /{log}
Action can be either /b -> Backup
or /r -> Restore or /d -> delete intermediate
database backup file.
To enable event logging give /l switch
as the third parameter else simply do not give any third
parameter.
Example 1:
To do a backup of the databases mentioned
in the file "c:\sqlinifile.ini", with the logging enabled
we call the agent as:
MOSQLBackupAgent.exe /b "c:\sqlinifile.ini" /l
Example 2:
To do a restore of the databases
mentioned in the file "c:\sqlinifile.ini", without the
logging we call the agent as:
Example 3:
MOSQLBackupAgent.exe /r "c:\sqlinifile.ini"
To delete all the temporary database
backup files mentioned in the file "c:\sqlinifile.ini",
with the logging we call the agent as:
MOSQLBackupAgent.exe /d "c:\sqlinifile.ini" /l

In the "DatabaseInfo" section we
specify the number of databases in the key "NumberOfDatabases".
Then for each database in consideration we have the
individual sections e.g. Database1, Database2 etc. In
each of the individual sections we have the required
information in the keys "SQLServerName", "UserID", "Password",
"DatabaseName" and "BackupLocation". A sample ini file
is described below:
[DatabaseInfo]
NumberOfDatabases = 2
[Database2]
SQLServerName = GOLOO\GOLOOSQL
UserID = sa
Password =
DatabaseName = InformationRetreivalSystem
BackupLocation = c:\viraj\sqldata_bkp\InformationRetreivalSystem.bak
[Database1]
SQLServerName = GOLOO\GOLOOSQL
UserID = sa
Password =
DatabaseName = gb
BackupLocation = c:\viraj\sqldata_bkp\gb.bak
SQL Database Backup and Restore FAQ's
-
Does this Application do anything different then
a normal osql.exe backup or restore?
-
Answer:
This application uses a different API. It uses the
programmatic API of PL/SQL. This application has
command line parameters which integrate well with
Mobiliti suite of products. Additionally this application
also has event logging, error handling and returns
gracefully in case of an error. It also facilitates
the backup of more than one database in one execution
of the application. Using ini files for input this
application executes in a non interactive manner.
-
I
assume I can use a bat file to do the same thing,
is this?
-
Do
you have something in the registry of the Server
component that will automatically run and restore
the database after sync, so it is not a manual process?
-
What
type of performance results have you seen with this
backup type using block level differencing? For
example: a 200mb database with one record change,
how long will the sync take?
-
When
using the tool with Mobiliti client server products,
does the .bak file get compressed before transfer?

| Download
a fully functional version of Mobiliti SQL Agent
for free. |
 |

1)
Network/Unplugged:
Incremental
file synchronization, outlook backup
and offline network in one solution
2)
Continuity@Work:
Cost effective backup and synchronization solution
(including outlook pst backup )
|