\chapter{save} \hypertarget{md_docs_2basic_2save}{}\label{md_docs_2basic_2save}\index{save@{save}} \hypertarget{md_docs_2basic_2save_autotoc_md53}{}\doxysubsection{\texorpdfstring{autotoc\+\_\+md53}{autotoc\+\_\+md53}}\label{md_docs_2basic_2save_autotoc_md53} title\+: Arma\+RAMDb -\/ Save DB icon\+: mdi\+:file-\/text-\/outline \hypertarget{md_docs_2basic_2save_autotoc_md54}{}\doxysubsection{\texorpdfstring{excerpt\+: Save DB to disc.}{excerpt\+: Save DB to disc.}}\label{md_docs_2basic_2save_autotoc_md54} \hypertarget{md_docs_2basic_2save_autotoc_md55}{}\doxysection{\texorpdfstring{ramdb\+\_\+db\+\_\+fnc\+\_\+save}{ramdb\+\_\+db\+\_\+fnc\+\_\+save}}\label{md_docs_2basic_2save_autotoc_md55} \hypertarget{md_docs_2basic_2save_autotoc_md56}{}\doxysubsection{\texorpdfstring{Description}{Description}}\label{md_docs_2basic_2save_autotoc_md56} 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.\hypertarget{md_docs_2basic_2save_autotoc_md57}{}\doxysubsection{\texorpdfstring{Syntax}{Syntax}}\label{md_docs_2basic_2save_autotoc_md57} \begin{DoxyCode}{0} \DoxyCodeLine{[\_createBackup]\ call\ ramdb\_db\_fnc\_save} \end{DoxyCode} \hypertarget{md_docs_2basic_2save_autotoc_md58}{}\doxysubsection{\texorpdfstring{Parameters}{Parameters}}\label{md_docs_2basic_2save_autotoc_md58} \tabulinesep=1mm \begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|} \hline \PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default }\\\cline{1-4} \endfirsthead \hline \endfoot \hline \PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default }\\\cline{1-4} \endhead {\ttfamily \+\_\+create\+Backup} &Boolean &Whether to create a backup of the current state &false \\\cline{1-4} \end{longtabu} \hypertarget{md_docs_2basic_2save_autotoc_md59}{}\doxysubsection{\texorpdfstring{Return Value}{Return Value}}\label{md_docs_2basic_2save_autotoc_md59} None. The operation runs synchronously and saves the database immediately.\hypertarget{md_docs_2basic_2save_autotoc_md60}{}\doxysubsection{\texorpdfstring{Examples}{Examples}}\label{md_docs_2basic_2save_autotoc_md60} \hypertarget{md_docs_2basic_2save_autotoc_md61}{}\doxysubsubsection{\texorpdfstring{Save the database without creating a backup\+:}{Save the database without creating a backup\+:}}\label{md_docs_2basic_2save_autotoc_md61} \begin{DoxyCode}{0} \DoxyCodeLine{[]\ call\ ramdb\_db\_fnc\_save;} \end{DoxyCode} \hypertarget{md_docs_2basic_2save_autotoc_md62}{}\doxysubsubsection{\texorpdfstring{Save the database and create a backup\+:}{Save the database and create a backup\+:}}\label{md_docs_2basic_2save_autotoc_md62} \begin{DoxyCode}{0} \DoxyCodeLine{[true]\ call\ ramdb\_db\_fnc\_save;} \end{DoxyCode} \hypertarget{md_docs_2basic_2save_autotoc_md63}{}\doxysubsubsection{\texorpdfstring{Call the save function remotely from a client\+:}{Call the save function remotely from a client\+:}}\label{md_docs_2basic_2save_autotoc_md63} \begin{DoxyCode}{0} \DoxyCodeLine{[]\ remoteExecCall\ ["{}ramdb\_db\_fnc\_save"{},\ 2,\ false];} \end{DoxyCode} \hypertarget{md_docs_2basic_2save_autotoc_md64}{}\doxysubsection{\texorpdfstring{Notes}{Notes}}\label{md_docs_2basic_2save_autotoc_md64} \begin{DoxyItemize} \item This function should be called periodically to ensure data persistence \item The backup feature creates a timestamped copy of the database \item Automatic backups can be configured in the extension\textquotesingle{}s config file \item Saving is a resource-\/intensive operation, so it shouldn\textquotesingle{}t be called too frequently \item Consider saving before mission end or during low-\/activity periods \end{DoxyItemize}\hypertarget{md_docs_2basic_2save_autotoc_md65}{}\doxysubsection{\texorpdfstring{Related Functions}{Related Functions}}\label{md_docs_2basic_2save_autotoc_md65} \begin{DoxyItemize} \item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+load}\+: Loads the database from disk \end{DoxyItemize}\hypertarget{md_docs_2basic_2save_autotoc_md66}{}\doxysubsection{\texorpdfstring{Links}{Links}}\label{md_docs_2basic_2save_autotoc_md66} \doxysectlink{md_docs_2basic_2save}{Save DB}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2basic_2load}{Load DB}{0}