Hello Everyone!
This thread primarily pertains to systems on the EDGE and CURRENT build tiers.
Metadata for Backups version 2.0 is a new feature included with cPanel & WHM version 70. We document this new feature in the Release Notes for cPanel 70:
That said, the initial implementation of Metadata for Backups version 2.0 had lead to some concerns about the amount of disk space utilized by the /var/cpanel/backups/metadata.sqlite file. cPanel version 70.0.17 includes a case to help address this:
Fixed case CPANEL-18728: Reduce size of the backups metadata database.
Due to the nature of this change, attempting to restore a file using the File Restoration option in cPanel or WHM after updating to cPanel version 70.0.17 or newer on a system already using cPanel version 70 (EDGE and CURRENT build tiers) will fail. Here's an example of an error message you might see in the cPanel or WHM user interface when this happens:
This may correspond to entries like this in /usr/local/cpanel/logs/error_log:
To solve this issue, please follow the steps below:
Step 1: Check the size of the metadata.sqlite file and determine a location on your system that offers enough free disk space to store it:
Step 2: Once you've found a directory with sufficient available disk space, move the metadata.sqlite to the new location. I've used /home in the below example:
Step 3: Run the following command to regenerate the metadata file:
This will rebuild a working copy of the metadata.sqlite file and allow the File Restoration feature to work again.
Step 4: Once you've confirmed the File Restoration feature is working properly again, you can remove the copy of the previous metadata.sqlite file that was moved to the alternate location as a backup (e.g. /home/metadata.sqlite in the example above).
More information on how the MetaData and File Restoration features work is available at:
Metadata for Backups - cPanel Knowledge Base - cPanel Documentation
File Restoration for cPanel - Version 70 Documentation - cPanel Documentation
File Restoration for WHM - Version 70 Documentation - cPanel Documentation
Note that systems updating to cPanel version 70.0.17 or newer from cPanel version 68 or prior should not encounter this issue. It only affects systems on the EDGE and CURRENT build tiers that were already using cPanel version 70 prior to updating to cPanel version 70.0.17.
Additionally, let us know if you encounter any additional issues with the File Restoration feature after applying the above workaround.
Thank you.
This thread primarily pertains to systems on the EDGE and CURRENT build tiers.
Metadata for Backups version 2.0 is a new feature included with cPanel & WHM version 70. We document this new feature in the Release Notes for cPanel 70:
Because they are smaller in size, metafiles allow for a faster information-retrieval method compared to using the backup archive itself. This makes it possible for us to offer features like File Restoration in cPanel & WHM.The Backup system now stores backup metadata in SQL tables. The Backup system creates metadata whenever it performs a backup.
We introduced metadata for Backups version 1.0 in cPanel & WHM version 66. Version 1.0 stores metadata as a CSV format file. If your system contains metadata files, when cPanel & WHM upgrades to version 70, the upcp script (/usr/local/cpanel/scripts/upcp) executes a background task. This task converts the version 1.0 metadata files to version 2.0. Because this task runs in the background, it does not affect the upcp script's functionality.
For more information about metadata for Backups, read the Metadata for Backups version 2.0 section of the The backups_create_metadata Script documentation.
That said, the initial implementation of Metadata for Backups version 2.0 had lead to some concerns about the amount of disk space utilized by the /var/cpanel/backups/metadata.sqlite file. cPanel version 70.0.17 includes a case to help address this:
Fixed case CPANEL-18728: Reduce size of the backups metadata database.
Due to the nature of this change, attempting to restore a file using the File Restoration option in cPanel or WHM after updating to cPanel version 70.0.17 or newer on a system already using cPanel version 70 (EDGE and CURRENT build tiers) will fail. Here's an example of an error message you might see in the cPanel or WHM user interface when this happens:
Code:
Restoration failure for file “/filename”: “The system could <strong>not</strong> find the backup file.”.
Code:
Argument "FILE" isn't numeric in numeric eq (==) at /usr/local/cpanel/Cpanel/Backup/Restore.pm line 409, <STDIN> line 2.
Argument "file" isn't numeric in numeric eq (==) at bin/admin/Cpanel/restore.pl line 163, <STDIN> line 2.
Argument "compressed" isn't numeric in numeric eq (==) at bin/admin/Cpanel/restore.pl line 173, <STDIN> line 2.
Argument "compressed" isn't numeric in numeric eq (==) at /usr/local/cpanel/Cpanel/Backup/Restore.pm line 733, <STDIN> line 2.
Argument "FILE" isn't numeric in numeric ne (!=) at /usr/local/cpanel/Cpanel/Backup/Restore.pm line 512, <STDIN> line 2.
Step 1: Check the size of the metadata.sqlite file and determine a location on your system that offers enough free disk space to store it:
Code:
du -sh /var/cpanel/backups/metadata.sqlite
df -h
Code:
mv /var/cpanel/backups/metadata.sqlite /home/
Code:
/usr/local/cpanel/scripts/backups_create_metadata --all
Step 4: Once you've confirmed the File Restoration feature is working properly again, you can remove the copy of the previous metadata.sqlite file that was moved to the alternate location as a backup (e.g. /home/metadata.sqlite in the example above).
More information on how the MetaData and File Restoration features work is available at:
Metadata for Backups - cPanel Knowledge Base - cPanel Documentation
File Restoration for cPanel - Version 70 Documentation - cPanel Documentation
File Restoration for WHM - Version 70 Documentation - cPanel Documentation
Note that systems updating to cPanel version 70.0.17 or newer from cPanel version 68 or prior should not encounter this issue. It only affects systems on the EDGE and CURRENT build tiers that were already using cPanel version 70 prior to updating to cPanel version 70.0.17.
Additionally, let us know if you encounter any additional issues with the File Restoration feature after applying the above workaround.
Thank you.