{"id":241,"date":"2021-07-23T12:26:19","date_gmt":"2021-07-23T12:26:19","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/system-backups\/"},"modified":"2021-07-23T12:26:19","modified_gmt":"2021-07-23T12:26:19","slug":"system-backups","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/system-backups\/","title":{"rendered":"System Backups"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\">\n<div id=\"versioned-article-header\">\n<p class=\"valid-version-info\"><em>Valid for versions 90 through the latest version<\/em><\/p>\n<\/div>\n<div id=\"version-select-group\" aria-label=\"select versions\">\n<h4>Version:<\/h4>\n<h4>82<\/h4>\n<h4>86<\/h4>\n<h4>88<\/h4>\n<h4>90<\/h4>\n<\/div><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>If you enable system backups, your server saves system backup files in the local backup directory (<code>\/var\/cpanel\/backup<\/code>) by default. You can also save system backup files to an additional destination. You can do this manually, via API, or via WHM\u2019s <em>Backup Configuration<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backup &gt;&gt; Backup Configuration<\/em>).<\/p>\n<p>The <code>\/usr\/local\/cpanel\/bin\/backup<\/code> script uploads a <code>.tar<\/code> file that contains all of the system backup files to each destination that you configure to receive system backups. The system <strong>only<\/strong> sends system backup files to destinations whose files contain a <code>upload_system_backup<\/code> value of <code>1<\/code> (enabled).<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>cPanel &#038; WHM does <strong>not<\/strong> include an interface to restore system backup files. To restore content from system backup files, you <strong>must<\/strong> perform the restoration manually.<\/li>\n<li>The additional destination configuration file uses YAML format, which contains a simple associative array.<\/li>\n<li>For security purposes, ensure that the destination server is on your secure network. If your backups will <strong>not<\/strong> transfer to a server on your secure network, use a secure method such as SFTP, Amazon S3\u2122, or WebDAV with SSL.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"how-to-enable-system-backup-file-saves\">How to enable system backup file saves<\/h2>\n<p>To enable system backup file saves, you can perform one of the following actions:<\/p>\n<ul>\n<li>\n<p>Select the <em>Back up System Files<\/em> checkbox in the <em>Backup Settings<\/em> tab in WHM\u2019s <em>Backup Configuration<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backup &gt;&gt; Backup Configuration<\/em>).<\/p>\n<\/li>\n<li>\n<p>Use the WHM API 1 <code>backup_config_set<\/code> function and set the <code>backupfiles<\/code> value to <code>1<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"system-backup-files-and-directories\">System backup files and directories<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>The server backs up DNSSEC databases as part of the system files backup. The system can corrupt the DNSSEC database if it encounters an Out Of Memory (OOM) or disk full condition. The system administrator can also corrupt this database inadvertently.<\/p>\n<p>The system administrator can restore the database from the system backup files. If they do <strong>not<\/strong> back up system files, they will need to perform the following steps:<\/p>\n<ul>\n<li>Rebuild the <code>PDNS.db<\/code> file from scratch.<\/li>\n<li>Regenerate the DNSSEC keys for each domain that lost its DNSSEC key.<\/li>\n<li>Tell users to register the <strong>new<\/strong> DNSSEC keys with their domain registrar.<\/li>\n<\/ul><\/div>\n<\/div>\n<p>cPanel &#038; WHM backs up the following files and directories:<\/p>\n<h3 id=\"files\">Files<\/h3>\n<ul>\n<li><code>\/etc\/exim.conf<\/code><\/li>\n<li><code>\/etc\/exim.conf.local<\/code><\/li>\n<li><code>\/etc\/exim.conf.localopts<\/code><\/li>\n<li><code>\/etc\/named.conf<\/code><\/li>\n<li><code>\/etc\/named.conf<\/code><\/li>\n<li><code>\/etc\/proftpd.conf<\/code><\/li>\n<li><code>\/etc\/pure-ftpd.conf<\/code><\/li>\n<li><code>\/etc\/localdomains<\/code><\/li>\n<li><code>\/etc\/apache2\/conf\/httpd.conf<\/code><\/li>\n<li><code>\/etc\/group<\/code><\/li>\n<li><code>\/etc\/shadow<\/code><\/li>\n<li><code>\/etc\/passwd<\/code><\/li>\n<li><code>\/etc\/fstab<\/code><\/li>\n<li><code>\/etc\/ips<\/code><\/li>\n<li><code>\/etc\/ips.remotemail<\/code><\/li>\n<li><code>\/etc\/ips.remotedns<\/code><\/li>\n<li><code>\/etc\/manualmx<\/code><\/li>\n<li><code>\/etc\/reservedips<\/code><\/li>\n<li><code>\/etc\/reservedipreasons<\/code><\/li>\n<li><code>\/etc\/wwwacct.conf<\/code><\/li>\n<li><code>\/etc\/remotedomains<\/code><\/li>\n<li><code>\/etc\/rndc.conf<\/code><\/li>\n<li><code>\/etc\/secondarymx<\/code><\/li>\n<li><code>\/etc\/my.cnf<\/code><\/li>\n<li><code>\/root\/.my.cnf<\/code><\/li>\n<li><code>\/etc\/apache2\/conf\/httpd.conf<\/code><\/li>\n<\/ul>\n<h3 id=\"directories\">Directories<\/h3>\n<ul>\n<li><code>\/etc\/cpanel<\/code><\/li>\n<li><code>\/etc\/named<\/code><\/li>\n<li><code>\/etc\/valiases<\/code><\/li>\n<li><code>\/etc\/proftpd<\/code><\/li>\n<li><code>\/etc\/vdomainaliases<\/code><\/li>\n<li><code>\/etc\/ssl<\/code><\/li>\n<li><code>\/etc\/vfilters<\/code><\/li>\n<li><code>\/usr\/local\/cpanel\/3rdparty\/mailman<\/code><\/li>\n<li><code>\/var\/lib\/rpm<\/code><\/li>\n<li><code>\/var\/named<\/code><\/li>\n<li><code>\/var\/cpanel<\/code><\/li>\n<li><code>\/var\/spool\/cron<\/code><\/li>\n<li><code>\/var\/cpanel\/bandwidth<\/code><\/li>\n<li><code>\/var\/cpanel\/ssl<\/code><\/li>\n<li><code>\/var\/lib\/mysql<\/code><\/li>\n<li><code>\/etc\/pki\/tls\/certs\/<\/code><\/li>\n<\/ul>\n<h2 id=\"custom-files\">Custom files<\/h2>\n<p>To configure system backups to include custom files or directories, create a new file or directory in the <code>\/var\/cpanel\/backups\/extras<\/code> directory (for example, <code>\/var\/cpanel\/backups\/extras\/etc<\/code>). In that file, enter an absolute path to any files that you wish to back up (for example, <code>\/etc\/example.conf<\/code>).<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>The server administrator can edit the <code>\/etc\/my.cnf<\/code> file to change the MySQL\u00ae data directory location. The system will back up the directory at its new location.<\/p>\n<\/p><\/div>\n<\/div>\n<h2 id=\"how-to-configure-an-additional-destination-to-receive-system-backups\">How to configure an additional destination to receive system backups<\/h2>\n<p>To configure an additional destination to receive system backups, perform one of the following procedures:<\/p>\n<h3 id=\"interface-method\">Interface method<\/h3>\n<p>In WHM\u2019s <em>Backup Configuration<\/em> interface, select the <em>Additional Destinations<\/em> tab and enter the additional destination\u2019s information.<\/p>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>Make certain that you select the <em>Transfer System Backups to this Destination<\/em> checkbox.<\/p>\n<\/p><\/div>\n<\/div>\n<h3 id=\"manual-configuration-method\">Manual configuration method<\/h3>\n<p>To manually modify the configuration file of an additional destination, perform the following steps:<\/p>\n<ol>\n<li>Identify the configuration file in the <code>\/var\/cpanel\/backups<\/code> directory.\n<ul>\n<li>Each destination requires its own configuration file.<\/li>\n<li>The file name contains the destination name, the User ID (UID) label, and a UID character string. For example:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">myftp_UID_Z6rdq0rko2Z28uWTIN33SeCY.backup_destination<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>The UID sequence prevents conflicts with previously-created destinations that share the same name.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>Open the file with a text editor and add the following line:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">upload_system_backup: <span style=\"color:#ae81ff\">1<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>Save the file.<\/li>\n<\/ol>\n<h3 id=\"api-call-method\">API call method<\/h3>\n<p>To use API calls to modify the configuration file of an additional destination, perform the following steps:<\/p>\n<ol>\n<li>Call the WHM API 1 <code>backup_destination_list<\/code> function to retrieve the ID of the additional destination to which you wish to send system backups.<\/li>\n<li>Call the WHM API 1 <code>backup_destination_set<\/code> function and include the following parameters and values:\n<ul>\n<li><code>id<\/code> \u2014 The ID that the <code>backup_destination_list<\/code> function returned.<\/li>\n<li><code>upload_system_backup<\/code> \u2014 <code>1<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2 id=\"log-files\">Log files<\/h2>\n<p>The system\u2019s backup initialization logs to the <code>\/usr\/local\/cpanel\/logs\/error_log<\/code> file. The <code>error_log<\/code> file points to the individual account package logs. For more information, read our cPanel &#038; WHM Log Files documentation.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Valid for versions 90 through the latest version Version: 82 86 88 90 Overview If you enable system backups, your server saves system backup files in the local backup directory (\/var\/cpanel\/backup) by default. You can also save system backup files to an additional destination. You can do this manually, via API, or via WHM\u2019s Backup &hellip;<\/p>\n","protected":false},"author":1,"featured_media":242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/241"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/242"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}