388 lines
36 KiB
HTML
388 lines
36 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<title>Back up and recover databases</title>
|
||
<meta name="generator" content="Help+Manual" />
|
||
<meta name="keywords" content="" />
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="description" content="Elma365-Backupper is a utility that allows for backup of BRIX application data." />
|
||
<meta name="picture" content="" />
|
||
<meta property="og:type" content="website" />
|
||
<meta property="og:title" content="Full documentation for BRIX365 platform. Low-code developer guide. User guide. Admin guide. Developer guide." />
|
||
<meta property="og:url" content="https://brix365.com/en/help" />
|
||
<meta property="og:image" content="" />
|
||
<link rel="icon" href="favicon.png" type="image/png" />
|
||
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||
<link rel="stylesheet" href="./jquery-ui.min.css" />
|
||
<link rel="stylesheet" href="default.css" />
|
||
<link rel="stylesheet" href="./search-yandex.css" />
|
||
<link rel="stylesheet" href="./article.css" />
|
||
<link rel="stylesheet" href="./glossary.css" />
|
||
<link rel="stylesheet" href="./theme.css" />
|
||
<script type="text/javascript" src="jquery.js"></script>
|
||
<script type="text/javascript" src="helpman_settings.js"></script>
|
||
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
||
|
||
<script type="text/javascript" src="highlight.js"></script>
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){highlight();});
|
||
</script>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<script>!function(e,t,c,n,r,a,m){e.ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date;for(var s=0;s<document.scripts.length;s++)if(document.scripts[s].src===n)return;a=t.createElement(c),m=t.getElementsByTagName(c)[0],a.async=1,a.src=n,m.parentNode.insertBefore(a,m)}(window,document,"script","https://mc.yandex.ru/metrika/tag.js"),ym(83179930,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0})</script><noscript><div><img alt=""src=https://mc.yandex.ru/watch/83179930 style=position:absolute;left:-9999px></div></noscript>
|
||
|
||
<header class="header elma-365">
|
||
<div class="container">
|
||
<a class="header__logo" href="https://brix365.com/en/help">
|
||
<img src="./logo-en.svg" alt="header logo">
|
||
</a>
|
||
<!-- <div class="hero__search-form" id="search-panel">
|
||
<form class="search-form" onsubmit="ym(83180416,'reachGoal','poisk')">
|
||
<label class="search-form__label">
|
||
<span id="reset-search" class="search__icon"></span>
|
||
<input class="search-form__input" type="text">
|
||
</label>
|
||
<input class="search-form__submit" type="submit" value="Submit">
|
||
</form>
|
||
</div> -->
|
||
|
||
<div class="hero__search-form" id="search-panel"> <form class="search-form"> <label class="search-form__label"> <span id="reset-search" class="search__icon"></span> <input class="search-form__input" type="text"> </label> <input class="search-form__submit" type="submit" value="Submit"> </form> </div>
|
||
<div class="hero__search">
|
||
<a href="#" id="search-icon" class="hero__search-icon">
|
||
<img src="search-icon-white.svg" alt="search string">
|
||
</a>
|
||
<a href="#" id="side-menu-icon" class="hero__side-icon">
|
||
<img src="side_menu.svg" alt="side menu">
|
||
</a>
|
||
</div>
|
||
<div class="header__navi">
|
||
|
||
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a class="project-link" href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://brix365.com/en/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li><li><a class="project-link" href="https://brix365.com/en/help/business_solutions/-elma365-store.html">Business Solutions</a></li></ul></span></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li><li><a href="https://tssdk.brix365.com/" target="_blank">SDK</a></li></ul>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<main class="main container">
|
||
|
||
<aside class="sidebar" id="sidebar">
|
||
<div class="sidebar__header">
|
||
<a class="header__logo" href="https://brix365.com/en/help">
|
||
<img src="./logo-light-en.svg">
|
||
</a>
|
||
<span class="sidebar__close elma-365-close" id="close"></span>
|
||
</div>
|
||
<div class="sidebar__wrapper" id="side-menu">
|
||
|
||
</div>
|
||
</aside>
|
||
|
||
<article class="article" id="article">
|
||
<div class="article-inner">
|
||
<div class="content">
|
||
<header class="article__header">
|
||
<div class="article__bread" style="display:flex; gap:10px;">
|
||
<span id="subcategory" class="search-res__item-category search-res__item-category_subcategory subcategory article__badge"></span>
|
||
|
||
<div class="topic__breadcrumbs">
|
||
<p><a href="elma365-on-premises.html">BRIX On-Premises</a> > <a href="elma365-enterprise.html">BRIX On-Premises Enterprise</a> / Back up and recover databases</p>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">Back up and recover databases</span></h1>
|
||
</div>
|
||
|
||
</header>
|
||
<section class="article__content">
|
||
<div class="scroll-top-inner">
|
||
<a href="#h1-article" class="scroll-top"></a>
|
||
</div>
|
||
<!-- Placeholder for topic body. -->
|
||
<p class="p_Normal"><span style="font-weight: bold;">Elma365-Backupper</span> is a utility that allows for backup of BRIX application data.</p>
|
||
<p class="p_Normal"> </p>
|
||
<p class="p_Normal">Backup of BRIX should include:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal">PostgreSQL. The database stores the main system data: users, application items, application settings, workspaces, processes, pages, widgets, tasks, events, and other configuration settings.</li><li class="p_Normal">MongoDB. This database contains unstructured system settings, chat data, and activity streams.</li><li class="p_Normal">S3 Object Storage. The object storage holds uploaded and created files in BRIX of any type and size, such as documents, photographs, audio, and video files.</li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Начало внимание</span></p>
|
||
<p class="p_Normal">When creating a backup copy, the BRIX services are stopped, and the application itself becomes unavailable.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Конец внимание</span></p>
|
||
<p class="p_Normal">The process of database backup and recovery consists of four steps:</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><a href="database-backup-and-recovery.html#install-elma365-backupper" class="topiclink">Install elma365-Backupper</a>.</li><li value="2" class="p_Normal"><a href="database-backup-and-recovery.html#setting-elma365-backupper" class="topiclink">Configure elma365-Backupper</a>.</li><li value="3" class="p_Normal"><a href="database-backup-and-recovery.html#backup-database" class="topiclink">Database backup</a>.</li><li value="4" class="p_Normal"><a href="database-backup-and-recovery.html#recovery-database" class="topiclink">Database recovery</a>.</li></ol>
|
||
<h2 class="p_Heading2"><a id="install-elma365-backupper" class="hmanchor"></a><span class="f_Heading2">Step 1: Install elma365-Backupper</span></h2>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" class="p_Normal">Install the packages:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">sudo apt install -y apt-transport-https ca-certificates curl</span></p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="2" class="p_Normal">Import the keys:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">sudo curl -fsSL https://repo.elma365.tech/deb/elma365-keyring.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/elma365-keyring.gpg</span></p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="3" class="p_Normal"> Add the BRIX repository:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">echo "deb [arch=amd64] https://repo.elma365.tech/deb $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/elma365.list</span><br />
|
||
<span class="f_CodeExample">sudo apt update</span></p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="4" class="p_Normal">Install <span style="font-weight: bold;">elma365-Backupper</span>:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">sudo apt install elma365-backupper</span></p>
|
||
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A1')">Installation for Red Hat-like operating systems</a></p>
|
||
<div id="TOGGLE0186A1" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal">Add the BRIX repository:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">cat <<EOF | sudo tee /etc/yum.repos.d/elma365.repo</span><br />
|
||
<span class="f_CodeExample">[elma365_repo]</span><br />
|
||
<span class="f_CodeExample">name=ELMA365 Repository</span><br />
|
||
<span class="f_CodeExample">baseurl=https://repo.elma365.tech/rpm/ol/releases/9.2/x86_64</span><br />
|
||
<span class="f_CodeExample">gpgcheck=1</span><br />
|
||
<span class="f_CodeExample">gpgkey=https://repo.elma365.tech/rpm/elma365-keyring.gpg</span><br />
|
||
<span class="f_CodeExample">EOF</span></p>
|
||
<p class="p_Normal"> <br />
|
||
Please note that an rpm package is available only for Red Hat Enterprise Linux 9.</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="2" class="p_Normal">Install <span style="font-weight: bold;">Elma365-Backupper</span>:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">dnf install elma365-backupper</span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<h2 class="p_Heading2"><a id="setting-elma365-backupper" class="hmanchor"></a><span class="f_Heading2">Step 2: Configure elma365-Backupper</span></h2>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" class="p_Normal">Open configuration file <code><b>/opt/elma365/backupper/etc/config</b></code>:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">nano /opt/elma365/backupper/etc/config</span></p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="2" class="p_Normal">In the opened window, fill out the parameters:</li></ol>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>KUBECONFIG</b></code> is the path to the kubeconfig file, used for selecting the Kubernetes cluster and connecting to the Kubernetes API server. If not specified, <code><b>$HOME/.kube/config</b></code> is used by default.</li><li class="p_Normal"><code><b>BACKUP_DST</b></code> is the directory where the backup will be saved. Available options are: </li></ul>
|
||
<ul style="list-style-type:circle"><ul style="list-style-type:square">
|
||
<li class="p_Normal"><code><b>filesystem</b></code> is backup is saved to the local file system at the path specified in <code><b>BACKUP_PATH</b></code>.</li><li class="p_Normal"><code><b>s3</b></code> is backup is saved to an S3 storage, using settings specified in parameters <code><b>S3_BUCKET_NAME</b></code>, <code><b>S3_HOST</b></code>, <code><b>S3_PORT</b></code>, <code><b>S3_ROOT_USER</b></code>, <code><b>S3_ROOT_PASSWORD</b></code>, <code><b>S3_SSL_ENABLED</b></code>.</li></ul></li></ul>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>K8S_NS_DBS</b></code> is the namespace where the BRIX application is installed.</li><li class="p_Normal"><code><b>K8S_NS_APP</b></code> is the namespace where the built-in databases are installed, set up in the Kubernetes cluster. For more information, see <a href="embedded-databases-settings.html" class="topiclink">Prepare embedded databases</a>.</li></ul>
|
||
<p class="p_Normal" style="margin: 0 0 0 34px;">Ensure ports 7000, 7001, 7002 are available for port forwarding to access databases in the Kubernetes cluster. If necessary, ports can be overridden in <code><b>S3_SRC_PORT</b></code>, <code><b>PG_SRC_PORT</b></code>, <code><b>MONGO_SRC_PORT</b></code>.</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>BACKUP_LIFE</b></code> is the period in days for storing backup copies. Copies older than this value will be deleted during the next backup.</li><li class="p_Normal"><code><b>TMP_DIR</b></code> is the directory for storing temporary backups. There should be enough space for one backup. The backup is assembled in this directory before being moved to the storage location specified in <code><b>BACKUP_DST</b></code>.</li></ul>
|
||
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A2')">Example of a configured file</a></p>
|
||
<div id="TOGGLE0186A2" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># KUBECONFIG parameter — The path to the kubeconfig file, used for connecting to the Kubernetes cluster.</span><br />
|
||
<span class="f_CodeExample">KUBECONFIG=""</span><br />
|
||
<span class="f_CodeExample"># parameter BACKUP_DST — The directory where the backup will be saved. </span><br />
|
||
<span class="f_CodeExample"># Available options are: s3, filesystem</span><br />
|
||
<span class="f_CodeExample"># s3 — The backup will be saved to an S3 storage</span><br />
|
||
<span class="f_CodeExample"># filesystem — he backup will be saved to the local file system at the path specified in the BACKUP_PATH parameter.</span><br />
|
||
<span class="f_CodeExample">BACKUP_DST=filesystem</span><br />
|
||
<span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># The namespace where the BRIX application is installed</span><br />
|
||
<span class="f_CodeExample">K8S_NS_APP=elma365</span><br />
|
||
<span class="f_CodeExample"># The namespace where the built-in databases are installed</span><br />
|
||
<span class="f_CodeExample">K8S_NS_DBS=elma365-dbs</span><br />
|
||
<span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># The period in days for which the backup is stored</span><br />
|
||
<span class="f_CodeExample">BACKUP_LIFE=7</span><br />
|
||
<span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># The directory for storing temporary backup copies</span><br />
|
||
<span class="f_CodeExample">TMP_DIR="/opt/elma365/backupper/tmp"</span><br />
|
||
<span class="f_CodeExample"># The directory where backup copies will be stored</span><br />
|
||
<span class="f_CodeExample">BACKUP_PATH="/opt/elma365/backupper/backup/"</span><br />
|
||
<span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># Parameters for configuring sonnection to the S3 Storage for the backups to be stored</span><br />
|
||
<span class="f_CodeExample"># S3_BUCKET_NAME — The name of the bucket where backup copies will be stored. Reserved (unavailable) bucket names have the format (mask) "s3elma365*"</span><br />
|
||
<span class="f_CodeExample"># S3_HOST — URL of the S3 storage</span><br />
|
||
<span class="f_CodeExample"># S3_PORT — Port for connecting to the S3 storage</span><br />
|
||
<span class="f_CodeExample"># S3_ROOT_USER — The name of the user with read or write rights to the bucket specified in S3_BUCKET_NAME</span><br />
|
||
<span class="f_CodeExample"># S3_ROOT_PASSWORD — Password for the user S3_ROOT_USER</span><br />
|
||
<span class="f_CodeExample"># S3_SSL_ENABLED — Whether encryption is used when connecting to the external S3 storage (true/false)</span><br />
|
||
<span class="f_CodeExample">S3_BUCKET_NAME=""</span><br />
|
||
<span class="f_CodeExample">S3_HOST=""</span><br />
|
||
<span class="f_CodeExample">S3_PORT=""</span><br />
|
||
<span class="f_CodeExample">S3_ROOT_USER=""</span><br />
|
||
<span class="f_CodeExample">S3_ROOT_PASSWORD=""</span><br />
|
||
<span class="f_CodeExample">S3_SSL_ENABLED=true</span><br />
|
||
<span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample"># Port forwarding parameters for accessing databases in the Kubernetes cluster:</span><br />
|
||
<span class="f_CodeExample"># ВLocal ports specified in the following parameters will be forwarded to the Kubernetes cluster:</span><br />
|
||
<span class="f_CodeExample"># S3_SRC_PORT — Port for connecting to the S3 storage</span><br />
|
||
<span class="f_CodeExample"># PG_SRC_PORT — Port for connecting to PostgreSQL</span><br />
|
||
<span class="f_CodeExample"># MONGO_SRC_PORT — Port for connecting to MongoDB</span><br />
|
||
<span class="f_CodeExample">S3_SRC_PORT=7000</span><br />
|
||
<span class="f_CodeExample">PG_SRC_PORT=7001</span><br />
|
||
<span class="f_CodeExample">MONGO_SRC_PORT=7002</span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<h2 class="p_Heading2"><a id="backup-database" class="hmanchor"></a><span class="f_Heading2">Step 3: Database backup</span></h2>
|
||
<p class="p_Normal">Perform a backup of the BRIX application databases:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper backup <<db-type>></span></p>
|
||
<p class="p_Normal">Where <code><b><<db-type>></b></code> is the name of the database for which you want to perform the backup. The possible values for the argument are:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>mongo</b></code> for MongoDB.</li><li class="p_Normal"><code><b>postgres</b></code> for PostgreSQL.</li><li class="p_Normal"><code><b>s3</b></code> for S3 storage.</li><li class="p_Normal"><code><b>all</b></code> for all databases (MongoDB, PostgreSQL, S3).</li></ul>
|
||
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A3')">Additional backup command keys</a></p>
|
||
<div id="TOGGLE0186A3" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>--storage</b></code>. This key is used for backing up databases to a local directory. When using this key, the parameters set in the configuration file are adjusted as follows: <code><b>BACKUP_DST</b></code>=<code><b>filesystem</b></code> and <code><b>BACKUP_PATH</b></code>="path specified in the argument". </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper backup <<db-type>> --storage /opt/elma365/backupper/backup/</span></p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>-c --config</b></code>. This key allows overriding the path to the <span style="font-weight: bold;">elma365-Backupper</span> configuration file. The default path is: <code><b>/opt/elma365/backupper/etc/config</b></code>. </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper backup <<db-type>> --config /opt/elma365/backupper/etc/config</span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<h2 class="p_Heading2"><a id="recovery-database" class="hmanchor"></a><span class="f_Heading2">Step 4: Database recovery</span></h2>
|
||
<p class="p_Normal">You can restore databases from the latest or a specific version of the backup.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Начало внимание</span></p>
|
||
<p class="p_Normal">Before restoring data from a backup, clear the databases and S3 storage or use the <code><b>--cleanup-databases</b></code> key.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">Конец внимание</span></p>
|
||
<p class="p_Normal">For more details on how to prepare databases for restoration, refer to the following articles: <a href="postgresql.html#prepare-to-restore" class="topiclink">PostgreSQL</a> and <a href="mongodb.html#prepare-to-restore" class="topiclink">MongoDB</a>.</p>
|
||
<h3 class="p_Heading3"><span class="f_Heading3">Restoration from the latest backup</span></h3>
|
||
<p class="p_Normal">Execute the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper restore <<db-type>></span></p>
|
||
<p class="p_Normal">Where <code><b><<db-type>></b></code> is the name of the database for which you need to retrieve the list of backups. The argument values can be:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>mongo</b></code> for MongoDB.</li><li class="p_Normal"><code><b>postgres</b></code> for PostgreSQL.</li><li class="p_Normal"><code><b>s3</b></code> for S3 storage.</li><li class="p_Normal"><code><b>all</b></code> for all databases (MongoDB, PostgreSQL, S3).</li></ul>
|
||
<p class="p_Normal">With this command, you can restore databases to the latest backup found in the storage. </p>
|
||
<h3 class="p_Heading3"><span class="f_Heading3">Restoration from a specific backup</span></h3>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" class="p_Normal">Get the list of backups from the storage:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper backup-list <<db-type>></span></p>
|
||
<p class="p_Normal">Where <code><b><<db-type>></b></code> is the name of the database for which you need to retrieve the list of backups. The argument values can be:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>mongo</b></code> for MongoDB.</li><li class="p_Normal"><code><b>postgres</b></code> for PostgreSQL.</li><li class="p_Normal"><code><b>s3</b></code> for S3 storage.</li><li class="p_Normal"><code><b>all</b></code> for all databases (MongoDB, PostgreSQL, S3).</li></ul>
|
||
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A4')">Additional keys for the backup-list command</a></p>
|
||
<div id="TOGGLE0186A4" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>--storage</b></code>: searching for database backups in a local directory. </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper backup <<db-type>> --storage /opt/elma365/backupper/backup/</span></p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>-c --config</b></code>: overriding the path to the <span style="font-weight: bold;">elma365-Backupper</span> configuration file, the default path is: <code><b>/opt/elma365/backupper/etc/config</b></code>. </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper backup <<db-type>> --config /opt/elma365/backupper/etc/config</span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<p class="p_Normal">Depending on the backup storage method indicated in the <code><b>BACKUP_DST</b></code> parameter, the backup-list command will return:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal">For <code><b>s3</b></code>: names of directories with dumps in S3 storage.</li><li class="p_Normal">For <code><b>filesystem</b></code>: absolute paths to directories with dumps in the file system.</li></ul>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="2" class="p_Normal">Execute database restoration from a specific backup:</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper restore <<db-type>> --backup-path /path/to/backup</span></p>
|
||
<p class="p_Normal">The backup for database restoration is taken from the storage specified in the <code><b>BACKUP_DST</b></code> parameter:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal">If S3 storage is indicated:</li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper restore <<db-type>> --backup-path ELMA365_YYYY.MM.DD-HH.MI.SS</span></p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal">If a local directory is indicated:</li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">elma365-backupper restore <<db-type>> --backup-path /opt/elma365/backupper/backup/ELMA365_YYYY.MM.DD-HH.MI.SS/</span></p>
|
||
<p class="p_Normal"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A5')">Additional keys for the restore command</a></p>
|
||
<div id="TOGGLE0186A5" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>--cleanup-databases</b></code>: a flag for automatic database clearing before restoring from a backup. </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper restore <<db-type>> --backup-path /path/to/backup --cleanup-databases</span></p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal"><code><b>-c --config</b></code>: overriding the path to the <span style="font-weight: bold;">elma365-Backupper</span> configuration file, the default path is: <code><b>/opt/elma365/backupper/etc/config</b></code>. </li></ul>
|
||
<p class="p_Normal">Example of the command:</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample"> </span><br />
|
||
<span class="f_CodeExample">elma365-backupper restore <<db-type>> --backup-path /path/to/backup --config /opt/elma365/backupper/etc/config</span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="bottom-nav">
|
||
|
||
<a id="prev-link" class="topic__navi_prev" href="offline-version-update-enterprise.html">
|
||
<span class="bottom-nav__arrow bottom-nav__arrow--prev"></span> <span
|
||
class="bottom-nav__link">offline-version-update-enterprise.html</span>
|
||
</a>
|
||
|
||
|
||
<a id="next-link" class="topic__navi_next" href="backup-and-recovery-with-wal-g-and-rclone.html">
|
||
<span class="bottom-nav__link">backup-and-recovery-with-wal-g-and-rclone.html</span> <span
|
||
class="bottom-nav__arrow bottom-nav__arrow--next"></span>
|
||
</a>
|
||
|
||
</div>
|
||
<!-- добавляет на страницу строку блок Была ли статья полезной? -->
|
||
<div class="feedback" id="feedback"><div class="feedback-help"><span><b>Was this helpful?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx" style="display: none;">Thanks for your feedback!</div><div class="feedback__popup" id="feedback__popup_why" style="display: none;"><div class="feedback__popup-header">Please specify why:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Recommendations did not help me</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Article is hard to understand</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Didn`t answer my question</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Content does not match the topic</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Other</label></div><div class="feedback__popup" id="feedback__popup-other" style="display: none;"><div class="feedback__popup-header">How we can improve it?</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Submit"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg" class="small-img" alt="like"><spanclass="feedback-form__btn-group_yes-btn">Yes</spanclass="feedback-form__btn-group_yes-btn"></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg" class="small-img" alt="dislike"><spanclass="feedback-form__btn-group_no-btn">No</spanclass="feedback-form__btn-group_no-btn"></label></div><select name="category"><option disabled="">Please specify why</option><option value="bad_recommendation" selected="">Recommendations did not help me</option><option value="difficult_text">Article is hard to understand</option><option value="no_answer">Didn`t answer my question</option><option value="bad_header">Content does not match the topic</option><option value="other_reason">Other</option></select><input type="submit"></form></div><div class="found_typo"><p style="margin: 0px; margin-top: 16px !important;"><span><b>Found a typo?</b></span> Select it and press <i>Ctrl+Enter</i> to send us feedback</p></div></div>
|
||
|
||
</section>
|
||
</div>
|
||
<aside class="article__sidebar" style="display:none">
|
||
<input type="checkbox" />
|
||
<div class="article__arrow"></div>
|
||
<div class="table-of-contents elma365-right" id="toc2Content">
|
||
<h3 class="h3-toc">In this topic</h3>
|
||
<nav id="toc2"></nav>
|
||
</div>
|
||
</aside>
|
||
</div>
|
||
</article>
|
||
</main>
|
||
<footer class="footer">
|
||
<div class="footer-container">
|
||
<div class="footer-mobile">
|
||
|
||
<ul class="footer-mobile__list"><li><a href="https://brix365.com/en/" target="_blank">BRIX</a></li><li><a href="https://tssdk.brix365.com/en/latest/" target="_blank">SDK</a></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li></ul><ul class="footer-mobile__list"><li><a href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li></ul>
|
||
|
||
|
||
</div>
|
||
<div class="footer-wrap">
|
||
|
||
<div><span class="mobile-question-popup">Send feedback</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Ask a question</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Send"></div></form><div class="hidden fade-in question-success-xs">Sent</div></div>
|
||
|
||
<div class="footer-flex-b">
|
||
<span class="footer-copy">© 2025 BRIX</span>
|
||
<ul class="footer-list">
|
||
|
||
<li class="footer-item">
|
||
<a href="#" class="arrow-top" style="display: block;"></a>
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</footer>
|
||
<iframe name="hmnavigation" style="display:none!important"></iframe>
|
||
<script src="./jquery-ui.js"></script>
|
||
<!--script src="//cdn.jsdelivr.net/npm/featherlight@1.7.14/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script-->
|
||
<script src="./jquery.tocify.min.js"></script>
|
||
<script src="./TypoReporter.min.js"></script>
|
||
<script src="./google-search.js"></script>
|
||
<script src="./main.js"></script>
|
||
<script type="text/javascript">
|
||
HMInitToggle('TOGGLE0186A1','hm.type','dropdown','hm.state','0');
|
||
HMInitToggle('TOGGLE0186A2','hm.type','dropdown','hm.state','0');
|
||
HMInitToggle('TOGGLE0186A3','hm.type','dropdown','hm.state','0');
|
||
HMInitToggle('TOGGLE0186A4','hm.type','dropdown','hm.state','0');
|
||
HMInitToggle('TOGGLE0186A5','hm.type','dropdown','hm.state','0');
|
||
</script>
|
||
</body>
|
||
|
||
</html>
|