ramdb/docs/basic/save.md
Jacob Schmidt 8c0e8144e5 docs: Update documentation links and function references
This commit updates the documentation to reflect the current function names and link structure. Specifically, it addresses the following:

*   Corrected internal links within the documentation to point to the correct markdown files (e.g., `hashDelete.md` instead of `hashDelete`).
*   Updated related function references to reflect the current function names and include missing functions.
*   Removed outdated function references.
*   Added `ramdb_db_fnc_scheduler` to related functions where appropriate.
*   Updated the links section to use the correct markdown file names.
2025-03-22 16:53:30 -05:00

1.5 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - Save DB mdi:file-text-outline Save DB to disc.

ramdb_db_fnc_save

Description

Saves the entire database to disk storage. This function persists all data (key-value pairs, hash tables, and lists) to a file, allowing it to be retrieved later even after server restart.

Syntax

[_createBackup] call ramdb_db_fnc_save

Parameters

Parameter Type Description Default
_createBackup Boolean Whether to create a backup of the current state false

Return Value

None. The operation runs synchronously and saves the database immediately.

Examples

Save the database without creating a backup:

[] call ramdb_db_fnc_save;

Save the database and create a backup:

[true] call ramdb_db_fnc_save;

Call the save function remotely from a client:

[] remoteExecCall ["ramdb_db_fnc_save", 2, false];

Notes

  • This function should be called periodically to ensure data persistence
  • The backup feature creates a timestamped copy of the database
  • Automatic backups can be configured in the extension's config file
  • Saving is a resource-intensive operation, so it shouldn't be called too frequently
  • Consider saving before mission end or during low-activity periods
  • ramdb_db_fnc_load: Loads the database from disk

Save DB | Load DB