Table of Contents
This chapter provides administrative procedures that are unique to the Berkeley DB SQL interface.
You can use the standard SQLite .dump
command to backup the data managed by the BDB SQL interface.
The BDB SQL interface supports the standard SQLite Online Backup API.
However, there is a small difference between the two interfaces.
In the BDB SQL interface, the value returned by the sqlite3_backup_remaining
method
and the number of pages passed to the sqlite3_backup_step
method,
are estimates of the number of pages to be copied and not exact values.
To be certain that the backup process is complete,
check if the sqlite3_backup_step
method has returned SQLITE_DONE
.
To learn how to use SQLite Online Backup API, see the official SQLite
Documentation Page.
When BDB SQL interface databases are replicated .dump and the SQLite Online Backup API are not sufficient to create a backup. In a separate process you should use the db_hotbackup utility or other methods described in the Oracle Berkeley DB Backup Procedures section. You must then copy some additional files for the backup to be complete.
The additional files can be found in the journal directory of
the source database, and should be copied into the journal
directory of the backup copy. The journal directory is
automatically created when a Berkeley DB SQL interface database is created.
The journal directory is created in the same directory as the
database file, it has the name of the database file with a
-journal
appendix.
The files that need to be copied into the backup journal directory are:
__db.rep.egen
__db.rep.gen
__db.rep.init
__db.rep.system
pragma