dm_db_backup Function

public function dm_db_backup(db, path, wal, callback, nsteps, sleep_time) result(rc)

Uses

  • proc~~dm_db_backup~~UsesGraph proc~dm_db_backup dm_db_backup module~dm_file dm_file proc~dm_db_backup->module~dm_file module~dm_error dm_error module~dm_file->module~dm_error module~dm_kind dm_kind module~dm_file->module~dm_kind module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Creates online backup of given database. The functions assumes 500 steps and a sleep time of 250 msec by default, if the arguments are not passed.

The function returns the following error codes:

  • E_DB if closing the database failed.
  • E_DB_BACKUP if SQLite backup failed.
  • E_EXIST if backup database exists.
  • E_READ_ONLY if database is opened read-only.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

character(len=*), intent(in) :: path

File path of backup database to be created.

logical, intent(in), optional :: wal

Enable WAL mode for backup.

procedure(dm_db_backup_callback), optional :: callback

Progress callback routine.

integer, intent(in), optional :: nsteps

Number of steps per iteration (default: 500).

integer, intent(in), optional :: sleep_time

Sleep time per iteration in msec (default: 250 msec).

Return Value integer


Calls

proc~~dm_db_backup~~CallsGraph proc~dm_db_backup dm_db_backup proc~dm_db_close dm_db_close proc~dm_db_backup->proc~dm_db_close proc~dm_db_open dm_db_open proc~dm_db_backup->proc~dm_db_open proc~dm_db_sleep dm_db_sleep proc~dm_db_backup->proc~dm_db_sleep proc~dm_file_exists dm_file_exists proc~dm_db_backup->proc~dm_file_exists proc~dm_is_error dm_is_error proc~dm_db_backup->proc~dm_is_error sqlite3_backup_finish sqlite3_backup_finish proc~dm_db_backup->sqlite3_backup_finish sqlite3_backup_init sqlite3_backup_init proc~dm_db_backup->sqlite3_backup_init sqlite3_backup_pagecount sqlite3_backup_pagecount proc~dm_db_backup->sqlite3_backup_pagecount sqlite3_backup_remaining sqlite3_backup_remaining proc~dm_db_backup->sqlite3_backup_remaining sqlite3_backup_step sqlite3_backup_step proc~dm_db_backup->sqlite3_backup_step proc~dm_db_optimize dm_db_optimize proc~dm_db_close->proc~dm_db_optimize sqlite3_close sqlite3_close proc~dm_db_close->sqlite3_close proc~dm_db_open->proc~dm_file_exists proc~dm_db_open->proc~dm_is_error proc~dm_db_is_connected dm_db_is_connected proc~dm_db_open->proc~dm_db_is_connected proc~dm_db_set_application_id dm_db_set_application_id proc~dm_db_open->proc~dm_db_set_application_id proc~dm_db_set_busy_timeout dm_db_set_busy_timeout proc~dm_db_open->proc~dm_db_set_busy_timeout proc~dm_db_set_foreign_keys dm_db_set_foreign_keys proc~dm_db_open->proc~dm_db_set_foreign_keys proc~dm_db_set_journal_mode dm_db_set_journal_mode proc~dm_db_open->proc~dm_db_set_journal_mode proc~dm_db_set_user_version dm_db_set_user_version proc~dm_db_open->proc~dm_db_set_user_version proc~dm_db_validate dm_db_validate proc~dm_db_open->proc~dm_db_validate sqlite3_initialize sqlite3_initialize proc~dm_db_open->sqlite3_initialize sqlite3_open_v2 sqlite3_open_v2 proc~dm_db_open->sqlite3_open_v2 sqlite3_sleep sqlite3_sleep proc~dm_db_sleep->sqlite3_sleep sqlite3_finalize sqlite3_finalize proc~dm_db_optimize->sqlite3_finalize sqlite3_prepare_v2 sqlite3_prepare_v2 proc~dm_db_optimize->sqlite3_prepare_v2 sqlite3_step sqlite3_step proc~dm_db_optimize->sqlite3_step interface~dm_itoa dm_itoa proc~dm_db_set_application_id->interface~dm_itoa proc~dm_db_set_application_id->sqlite3_finalize proc~dm_db_set_application_id->sqlite3_prepare_v2 proc~dm_db_set_application_id->sqlite3_step sqlite3_busy_timeout sqlite3_busy_timeout proc~dm_db_set_busy_timeout->sqlite3_busy_timeout proc~dm_db_set_foreign_keys->sqlite3_finalize proc~dm_db_set_foreign_keys->sqlite3_prepare_v2 proc~dm_db_set_foreign_keys->sqlite3_step proc~dm_db_set_journal_mode->sqlite3_finalize proc~dm_db_set_journal_mode->sqlite3_prepare_v2 proc~dm_db_set_journal_mode->sqlite3_step proc~dm_db_set_user_version->interface~dm_itoa proc~dm_db_set_user_version->sqlite3_finalize proc~dm_db_set_user_version->sqlite3_prepare_v2 proc~dm_db_set_user_version->sqlite3_step proc~dm_db_validate->proc~dm_is_error proc~dm_db_get_application_id dm_db_get_application_id proc~dm_db_validate->proc~dm_db_get_application_id proc~dm_db_get_user_version dm_db_get_user_version proc~dm_db_validate->proc~dm_db_get_user_version proc~dm_db_get_application_id->sqlite3_finalize proc~dm_db_get_application_id->sqlite3_prepare_v2 proc~dm_db_get_application_id->sqlite3_step sqlite3_column_int sqlite3_column_int proc~dm_db_get_application_id->sqlite3_column_int sqlite3_column_type sqlite3_column_type proc~dm_db_get_application_id->sqlite3_column_type proc~dm_db_get_user_version->sqlite3_finalize proc~dm_db_get_user_version->sqlite3_prepare_v2 proc~dm_db_get_user_version->sqlite3_step proc~dm_db_get_user_version->sqlite3_column_int proc~dm_db_get_user_version->sqlite3_column_type