You just have to call the
gbak utility from the script file. Refer to the OroTimesheet 7 installation guide for more information about backing up the database.
Example of a script under Windows
This example backups the default OroTimesheet 7 database (file
ot.fdb) that is located in the
C:\Documents and Settings\All Users\Application Data\OroLogic\OroTimesheet\Databases folder on the Windows server then create the file
ot.fbk in the same folder. The
gbak utility is located in the
C:\Program Files\Firebird\Firebird_2_5\bin\ folder. This script is ran directly from the server.
REM BEGIN SCRIPT
"C:\Program Files\Firebird\Firebird_2_5\bin\gbak" -B -USER SYSDBA -PASSWORD masterkey "C:\Documents and Settings\All Users\Application Data\OroLogic\OroTimesheet\Databases\ot.fdb" "C:\Documents and Settings\All Users\Application Data\OroLogic\OroTimesheet\Databases\ot.fbk"
REM END SCRIPT
Important notice: The command above will work only if it is run directly from the server console. This command will not work if you run it through a client terminal server session or for example if the command is run in background from a task scheduler software. In such case, you must specify the server name as well as the port number on which Firebird is running (TCP/IP syntax). Usually, the default port number used is 3050. Verify your OroTimesheet 7 connection parameters to see which port number to use in the command.
Here is the same example as above, except that the server name and port number is specified:
REM BEGIN SCRIPT
"C:\Program Files\Firebird\Firebird_2_5\bin\gbak" -B -USER SYSDBA -PASSWORD masterkey "localhost/3050:C:\Documents and Settings\All Users\Application Data\OroLogic\OroTimesheet\Databases\ot.fdb" "C:\Documents and Settings\All Users\Application Data\OroLogic\OroTimesheet\Databases\ot.fbk"
REM END SCRIPT
In this example, the server is named
localhost and the port number on which Firebird is running is 3050. Note that you must add the character
/ between the server name and the port number and add the character
: after the port number. Please, also note that you could enter the IP address of the server instead of its name.
Example of a script under Linux or Unix
This example backups the OroTimesheet 7 database (file
ot.fdb) that is located in the
/home/orotimesheet folder on Linux or Unix server and create the backup file
ot.fbk in the same folder The
gbak utility is located in the
/opt/firebird/bin folder. This script is ran directly from the server.
# BEGIN SCRIPT
/opt/firebird/bin/gbak -b -user SYSDBA -password masterkey /home/orotimesheet/ot.fdb /home/orotimesheet/ot.fbk
# END SCRIPT
A
.fbk file is a special Firebird backup file format. To be able to restore a database from a
.fbk file, you must obligatory restore the file using the Firebird
gbak utility.
For more information about the
gbak utility, refer to the
Firebird documentation. For more information about script files, refer to your operating system documentation.
Once you backed-up your database, we recommend you to store a copy of your backup file on tape or other media. For further information on tape or other media to use for storage, ask your computer's sales representative.