Journal Archives
Go Up to Invoking Service Tasks with isc_service_start( )
Use the cluster identifiers isc_action_svc_backup, isc_action_svc_restore or isc_action_svc_properties to request that the Services Manager perform various operations on InterBase Journal Archives.
This is a programmatic method invoking the gbak tool as a thread in the ibserver process. You must specify the absolute full path of the database primary file, and recovery-related database files.
Because the Services Manager executes archive management tasks on the server host, the Services Manager reads and writes journal archive location files on the server host. The Services Manager also creates files in the context of the server.
The following table lists arguments to various Journal Archive management actions via isc_action_svc_backup/restore/properties.
Action | Argument | Purpose | Argument length | Argument value |
---|---|---|---|---|
isc_action_svc_backup |
isc_spb_bkp_archive_database |
Request to execute an Archive Database operation and create an archive database copy from a source database. This is passed as a stand alone option value to isc_spb_options. This operation is equivalent to the "gbak -archive_database" command. |
0 |
0 |
isc_spb_dbname |
Path of the primary file of the database, from the point of view of the server. This database will be copied by the database engine to the Journal Archive location defined for that database using CREATE JOURNAL ARCHIVE command. |
2 bytes + string |
String | |
isc_action_svc_backup |
isc_spb_bkp_archive_journals |
Request to execute an Archive Journals operation and copy journal files for the source database to the journal archive directory location. This is passed as a standalone option value to isc_spb_options. This operation is equivalent to the "gbak -archive_journals" command. |
0 |
0 |
isc_spb_dbname |
Path of the primary file of the database, from the point of view of the server. The journal files for this database will be copied by the database engine to the Journal Archive location defined for that database using the CREATE JOURNAL ARCHIVE command. |
2 bytes + string |
String | |
isc_action_svc_restore |
isc_spb_res_archive_recover |
Request to execute an Archive Recover operation and recover from a database archive in the journal archive directory location. This is passed as a stand alone option value to isc_spb_options. This operation is equivalent to the "gbak -archive_recover" command. |
0 |
0 |
isc_spb_bkp_file |
Path of the database in the Journal Archive location, from the point of view of the server. The database file mentioned will be used as the source database to recover from followed by recovering data from associated journals from the same archive location. |
2 bytes + string |
String | |
isc_spb_dbname |
Path of the database file to restore to (or create), from the point of view of the server. The newly restored database once fully recovered will be set to "read_only" mode and can be brought back online later. |
2 bytes + string |
String | |
isc_spb_res_archive_recover_until |
This is an optional argument for Point-in-time-recovery; this operation is equivalent to "gbak -until <timestamp>" command. Argument value is string indicating Timestamp format. Accepted Timestamp string format detailed in Embedded SQL Guide (EmbedSQL.pdf) chapter "Working with Dates and Times", section "Formatting Dates for Input". |
2 bytes + string |
String | |
isc_action_svc_properties |
isc_spb_prp_archive_dumps |
Request to execute an Archive Dumps operation to set a limit of database dump versions in the journal archive directory location. This operation is equivalent to the "gfix -archive_dumps <n>" command. |
4 bytes |
Unsigned 32-bit integer value indicating number of dump files to maintain. |
isc_action_svc_properties |
isc_spb_prp_archive_sweep |
Request to execute an Archive Sweep operation to sweep (delete) database dump files that have a sequence number less than the provided value in the journal archive directory location; the sweep also deletes associated journal files for those database dump files. This operation is equivalent to the "gfix -archive_sweep <n>" command. |
4 bytes |
Unsigned 32-bit integer value indicating sequence number below which to sweep database dump files. |
The Journal Archive-related operations:
Refer to <interbase>/examples/ib_archive.c
for sample applications for the Journal Archive-related operations.