Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_backup_restore.h File Reference

Declares native backup and restore report builders. More...

Go to the source code of this file.

Functions

Backup and restore report helpers
char * build_native_backup_report_local_json (const ServeConfig *config, const AppRuntime *app, const char *backend_override, const char *output_dir_override, char **error_out)
 Builds a JSON report describing a native app backup operation.
char * build_native_restore_report_local_json (const ServeConfig *config, const AppRuntime *app, const char *backend_override, const char *input_dir, char **error_out)
 Builds a JSON report describing a native app restore operation.

Detailed Description

Declares native backup and restore report builders.

Definition in file native_backup_restore.h.

Function Documentation

◆ build_native_backup_report_local_json()

char * build_native_backup_report_local_json ( const ServeConfig * config,
const AppRuntime * app,
const char * backend_override,
const char * output_dir_override,
char ** error_out )

Builds a JSON report describing a native app backup operation.

Parameters
configActive serve configuration.
appFinalized app runtime to back up.
backend_overrideOptional backend override.
output_dir_overrideOptional output directory override.
error_outOptional destination for an allocated error message.
Returns
Newly allocated JSON report text, or NULL on failure.

Definition at line 217 of file native_backup_restore.c.

References copy_file_binary(), ensure_directory(), json_string_dup_native(), native_backup_base_dir(), native_backup_restore_strdup, native_backup_timestamp_utc(), native_default_backend_local(), native_default_sqlite_path_local(), native_migration_fixture_path(), native_migration_schema_version(), native_write_backup_state_snapshot(), path_exists(), path_join(), streq(), ServeConfig::target_id, and write_text_file().

Referenced by handle_native_backup_restore_ops_command().

◆ build_native_restore_report_local_json()

char * build_native_restore_report_local_json ( const ServeConfig * config,
const AppRuntime * app,
const char * backend_override,
const char * input_dir,
char ** error_out )

Builds a JSON report describing a native app restore operation.

Parameters
configActive serve configuration.
appFinalized app runtime to restore into.
backend_overrideOptional backend override.
input_dirDirectory containing restore input artifacts.
error_outOptional destination for an allocated error message.
Returns
Newly allocated JSON report text, or NULL on failure.

Definition at line 366 of file native_backup_restore.c.

References copy_file_binary(), ensure_directory(), json_string_dup_native(), native_backup_restore_strdup, native_default_backend_local(), native_default_sqlite_path_local(), native_metadata_artifact_value(), path_dirname(), path_exists(), path_join(), AppRuntime::state_path, streq(), and ServeConfig::target_id.

Referenced by handle_native_backup_restore_ops_command().