{"id":230,"date":"2021-07-23T12:26:00","date_gmt":"2021-07-23T12:26:00","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-manage-metadata-settings\/"},"modified":"2021-07-23T12:26:00","modified_gmt":"2021-07-23T12:26:00","slug":"how-to-manage-metadata-settings","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-manage-metadata-settings\/","title":{"rendered":"How to Manage Metadata Settings"},"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 76 through the latest version<\/em><\/p>\n<\/div>\n<div id=\"version-select-group\" aria-label=\"select versions\">\n<h4>Version:<\/h4>\n<h4>76<\/h4>\n<\/div><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>System administrators can manage whether to create metadata for backups. Every time that cPanel &#038; WHM creates a backup, it creates metadata for that backup. You can also manually generate backup metadata with the <code>backups_create_metadata<\/code> script. There are several settings that disable metadata creation. You may want to disable metadata creation for testing, before an upgrade, or if your server experiences performance issues.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>The <code>backups_create_metadata<\/code> script will generate metadata for all directories under the <code>\/home\/username<\/code> directory, except for the <code>\/mail<\/code> and <code>\/.cpanel<\/code> directories.<\/li>\n<li>Backups and metadata <strong>must<\/strong> exist on the local disk before users can access the following interfaces in cPanel &#038; WHM version 72 and later:\n<ul>\n<li>cPanel\u2019s <em>File and Directory Restoration<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Files &gt;&gt; File and Directory Restoration<\/em>).<\/li>\n<li>WHM\u2019s <em>File and Directory Restoration<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backups &gt;&gt; File and Directory Restoration<\/em>).<\/li>\n<\/ul>\n<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"enable-metadata-creation\">Enable metadata creation<\/h2>\n<p>Every time that cPanel &#038; WHM creates a backup, it creates metadata for that backup. The system stores that metadata as entries in a <code>username.db<\/code> database (where <code>username<\/code> represents the cPanel account\u2019s username). Then, the system saves the database to the <code>.meta<\/code> directory under your configured backup directory. The metadata databases store the indexed information of their related backups. These smaller database entries provide a faster information-retrieval method than their source backup.<\/p>\n<h3 id=\"metadata-database-tables\">Metadata database tables<\/h3>\n<p>The following tables describe the fields of these smaller databases, the <code>backup_paths<\/code> table, the <code>backups<\/code> table, the <code>file_changes<\/code> table, the <code>metadata<\/code> table, and the <code>seen_files<\/code> table.<\/p>\n<h4 id=\"the-backup-paths-table\">The backup_paths table<\/h4>\n<p>The <code>backup_paths<\/code> table lists the backup files\u2019 paths.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>backup_path<\/code><\/td>\n<td><em>string<\/em><\/td>\n<td>The backup files\u2019s filepath, relative to the configured backup directory.<\/td>\n<td>A string value.<\/td>\n<td><code>\/backup\/2018-04-12\/accounts<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>backup_id<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The backup file\u2019s identification number.<\/td>\n<td>A positive integer. This value references the backup_id value in the backupstable.<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"the-backups-table\">The backups table<\/h4>\n<p>The <code>backups<\/code> table lists the backup files on the disk.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>backup_id<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The backup file\u2019s identification number.<\/td>\n<td>An automatically-incrementing positive integer.<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>timestamp<\/code><\/td>\n<td><em>timestamp<\/em><\/td>\n<td>The backup files\u2019s creation date in Universal Time Coordinated (UTC).<\/td>\n<td>An integer.<\/td>\n<td><code>1523642274<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>does_exist<\/code><\/td>\n<td><em>Boolean<\/em><\/td>\n<td>Whether the backup file exists.<\/td>\n<td>\n<ul>\n<li><code>1<\/code> \u2014 Exists.<\/li>\n<li><code>0<\/code> \u2014 Does <b>not<\/b> exist.<\/li>\n<\/ul>\n<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"the-file-changes-table\">The file_changes table<\/h4>\n<p>The <code>file_changes<\/code> table lists backup file changes when any of the following actions occur:<\/p>\n<ul>\n<li>The first time the system backs up the file.<\/li>\n<li>The user modifies the file.<\/li>\n<li>The user removes the file.<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>seen_files_id<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The filepath\u2019s identification number.<\/td>\n<td>A positive integer. This value references the <code>file_id<\/code> value in the <code>seen_files<\/code> table.<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>backup_id<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The backup file\u2019s identification number.<\/td>\n<td>A positive integer. This value references the <code>backup_id<\/code> value in the <code>backups<\/code> table<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>size<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The backup file\u2019s size, in bytes.<\/td>\n<td>\n<ul>\n<li>A file <code>size<\/code> value displays the file\u2019s size.<\/li>\n<li> A directory or a symlink displays a <code>0<\/code> file size.<\/li>\n<\/ul>\n<\/td>\n<td><code>660<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>mtime<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The date when the user last modified the file, in UTC format.<\/td>\n<td>An integer.<\/td>\n<td><code>1523642274<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>operation<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The change type.<\/td>\n<td>\n<ul>\n<li><code>0<\/code> \u2014 The user created the backup file.<\/li>\n<li><code>1<\/code> \u2014 The user changed the file.<\/li>\n<li><code>2<\/code> \u2014 The user removed the file.<\/li>\n<\/ul>\n<\/td>\n<td><code>0<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>type<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The backup file\u2019s type.<\/td>\n<td>\n<ul>\n<li><code>0<\/code> \u2014 A file.<\/li>\n<li><code>1<\/code> \u2014 A directory.<\/li>\n<li><code>2<\/code> \u2014 A symlink<\/li>\n<\/ul>\n<\/td>\n<td><code>0<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"the-metadata-table\">The metadata table<\/h4>\n<p>This table stores metadata keys and values.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>key<\/code><\/td>\n<td><em>string<\/em><\/td>\n<td>The metadata code type.<\/td>\n<td><code>schema_version<\/code> \u2014 The metadata schema\u2019s type.<\/td>\n<td><code>schema_version<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>value<\/code><\/td>\n<td><em>string<\/em><\/td>\n<td>The metadata code\u2019s version number.<\/td>\n<td>A string value.<\/td>\n<td><code>3.1<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"the-seen-files-table\">The seen_files table<\/h4>\n<p>This table stores filenames.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>file_id<\/code><\/td>\n<td><em>integer<\/em><\/td>\n<td>The file\u2019s identification number.<\/td>\n<td>An automatically-incrementing positive integer.<\/td>\n<td><code>1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>path<\/code><\/td>\n<td><em>string<\/em><\/td>\n<td>The file\u2019s filepath, relative to the <code>\/home\/username<\/code> directory.<\/td>\n<td>A string value.<\/td>\n<td><code>\/public_html\/<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"the-master-meta-file\">The master meta file<\/h3>\n<p>The <code>.master.meta<\/code> file stores relevant data about cPanel user backups that is not stored in the metadata database tables. This information, unlike the information in the tables, doesn\u2019t change.<\/p>\n<p>Every accounts directory inside the daily, weekly, and monthly backup directories contains a <code>.master.meta<\/code> file.<\/p>\n<h2 id=\"the-backup-directory-structure\">The backup directory structure<\/h2>\n<p>The system stores backups inside the <code>\/backup<\/code> directory in one of three different formats: compressed, uncompressed, and incremental. Each format uses a different filename extension.<\/p>\n<table>\n<thead>\n<tr>\n<th>Backup format<\/th>\n<th>Filename extension<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>compressed<\/td>\n<td><code>.tar.gz<\/code><\/td>\n<td><code>username.tar.gz<\/code><\/td>\n<\/tr>\n<tr>\n<td>uncompressed<\/td>\n<td><code>.tar<\/code><\/td>\n<td><code>username.tar<\/code><\/td>\n<\/tr>\n<tr>\n<td>incremental<\/td>\n<td>None<\/td>\n<td><code>username<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The system distinguishes each backup by its filepath, even if the system stores the backup information under the same name. The filepath includes the backup directory where the backup resides. The following example shows the layout and structure of a <code>\/backup<\/code> directory.<\/p>\n<figure>\n    <img src=\"https:\/\/ssdsunucum.com\/blog\/wp-content\/uploads\/2021\/07\/backup-folder-tree.png\" width=\"900\" title=\"backup-folder-tree\"><br \/>\n<\/figure>\n<p>This directory includes daily, monthly, and weekly compressed backups. You can distinguish each backup type by its complete filepath. This filepath is the file\u2019s full path. The system stores the metadata for this path in the <code>backup_paths<\/code> table, under the <code>backup_path<\/code> field.<\/p>\n<p>The system also stores metafiles in the <code>\/backup<\/code> directory and distinguished by their filepath. The system stores metafiles inside the <code>\/backup<\/code> directory as entries in a <code>username.db<\/code> database (where <code>username<\/code> represents the cPanel account\u2019s username).<\/p>\n<h2 id=\"disable-metadata-creation\">Disable metadata creation<\/h2>\n<p>You can manually disable metadata with WHM\u2019s <em>Backup Configuration<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backup &gt;&gt; Backup Configuration<\/em>). The following table shows which settings affect the management of metadata manually and the Backup Configuration interface. These settings function independently from one another.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>When you configure any of these settings to disable metadata creation, the following actions occur:\n<ul>\n<li>The system disables cPanel\u2019s <em>File and Directory Restoration<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Files &gt;&gt; File and Directory Restoration<\/em>) and WHM\u2019s <em>File and Directory Restoration<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backups &gt;&gt; File and Directory Restoration<\/em>). The interfaces display a notification that explains why the feature is unavailable.<\/li>\n<\/ul>\n<\/li>\n<li>You can disable metadata with the WHM API 1 <code>backup_config_set<\/code> function.<\/li>\n<\/ul><\/div>\n<\/div>\n<table>\n<thead>\n<tr>\n<th>Backup configuration file setting<\/th>\n<th><em>Backup Configuration<\/em> interface setting<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>DISABLE_METADATA<\/code><\/td>\n<td><strong>None<\/strong>. You must manually configure this setting with the WHM API 1 <code>backup_config_set<\/code> function.<\/td>\n<td><em>string<\/em><\/td>\n<td>Whether the Backup system creates metadata when a backup runs.<\/td>\n<td>\n<ul>\n<li><code>yes<\/code> \u2014 Disables metadata creation.<\/li>\n<li><code>no<\/code> \u2014 Enables metadata creation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><code>BACKUPACCTS<\/code><\/td>\n<td><em>Backup Accounts<\/em><\/td>\n<td><em>string<\/em><\/td>\n<td>Whether the system includes cPanel user accounts in the backup. <\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        System administrators can select which cPanel user accounts they wish to include in the backup through the <em>Backup User Selection<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Backup &gt;&gt; Backup User Selection<\/em>).\n    <\/div>\n<\/div>\n<\/td>\n<td>\n<ul>\n<li><code>yes<\/code> or selected checkbox \u2014 Include the cPanel user accounts in the backup and <b>enable<\/b> metadata creation.<\/li>\n<li><code>no<\/code> or deselected checkbox \u2014 Do <b>not<\/b> include the cPanel user accounts in the backup and <b>disable<\/b> metadata creation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><code>BACKUPENABLE<\/code><\/td>\n<td><em>Backup Status<\/em><\/td>\n<td><em>string<\/em><\/td>\n<td>Whether the WHM System Administrator wants backups enabled.<\/td>\n<td>\n<ul>\n<li><code>yes<\/code> or set toggle to <i>Enable<\/i> \u2014 Enables backup and metadata creation.<\/li>\n<li><code>no<\/code> or set toggle to <i>Disable<\/i> \u2014 Disables backup and metadata creation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><code>BACKUPMOUNT<\/code><\/td>\n<td><em>Mount Backup Drive as Needed<\/em><\/td>\n<td><em>Boolean<\/em><\/td>\n<td>Whether the system mounts the backup directory as a mount point before a backups runs, then unmounts it when the run completes.<\/td>\n<td>\n<ul>\n<li><code>1<\/code> or selected checkbox &#8212;Mount the backup directory and <b>disable<\/b> metadata creation.<\/li>\n<li><code>0<\/code> or deselected checkbox \u2014 Do <b>not<\/b> mount the backup directory and <b>enable<\/b> metadata creation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><code>KEEPLOCAL<\/code><\/td>\n<td><em>Retain backups in the default backup directory<\/em><\/td>\n<td><em>Boolean<\/em><\/td>\n<td>Whether the system retains backups in the default local backup directory.<\/td>\n<td>\n<ul>\n<li><code>1<\/code> or selected checkbox \u2014 Retains the backup and <b>enable<\/b> metadata creation.<\/li>\n<li><code>0<\/code> or deselected checkbox &#8212; Does <b>not<\/b> retain the backup and <b>disable<\/b> metadata creation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Valid for versions 76 through the latest version Version: 76 Overview System administrators can manage whether to create metadata for backups. Every time that cPanel &#038; WHM creates a backup, it creates metadata for that backup. You can also manually generate backup metadata with the backups_create_metadata script. There are several settings that disable metadata creation. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":231,"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\/230"}],"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=230"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/230\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/231"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}