{"id":20329,"date":"2024-02-16T15:49:23","date_gmt":"2024-02-16T14:49:23","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-portal\/installers-guide\/diagnostic\/diagnosing-file-integrity-on-storage\/"},"modified":"2024-06-10T12:23:33","modified_gmt":"2024-06-10T10:23:33","slug":"diagnosing-file-integrity-on-storage","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-portal\/installers-guide\/diagnostic\/diagnosing-file-integrity-on-storage\/","title":{"rendered":"Diagnosing File Integrity on Storage"},"content":{"rendered":"<div id=\"main-content\" class=\"wiki-content group\">\n<p><span style=\"font-size: 10.5pt;\">This article details the steps to verify that all files stored on disk by&nbsp;&nbsp;<\/span>Open Bee\u2122 Portal&nbsp;<span style=\"font-size: 10.5pt;\">are present and have integrity.&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10.5pt;\">It is highly recommended that you run it after restoring a backup.&nbsp;<\/span><\/p>\n<style type=\"text\/css\"><![CDATA[\/*<![CDATA[*\/ div.rbtoc1648215952545 {padding: 0px;} div.rbtoc1648215952545 ul {list-style: disc;margin-left: 0px;} div.rbtoc1648215952545 li {margin-left: 0px;padding-left: 0px;} \/*]]]]><![CDATA[>*\/]]><\/style>\n<div class=\"toc-macro rbtoc1648215952545\">\n<ul class=\"toc-indentation\">\n<li><a href=\"#Diagnostiquedel'int%C3%A9grit%C3%A9desfichierssurlestockage-Pr%C3%A9prequis\">Prerequisites<\/a><\/li>\n<li><a href=\"#Diagnostiquedel'int%C3%A9grit%C3%A9desfichierssurlestockage-Lancerlescript\">Run the script<\/a><\/li>\n<li><a href=\"#Diagnostiquedel'int%C3%A9grit%C3%A9desfichierssurlestockage-R%C3%A9sultat\">Result&nbsp;<\/a><\/li>\n<\/ul>\n<\/div>\n<h1 id=\"Diagnostiquedel'int\u00e9grit\u00e9desfichierssurlestockage-Pr\u00e9prequis\">Prerequisites<\/h1>\n<p>The diagnostic tool runs from a console (command-line interface).<\/p>\n<p><a href=\"https:\/\/www.python.org\/\" class=\"external-link\" rel=\"nofollow\">Python<\/a> language must be installed.&nbsp;<\/p>\n<p>Pyhton&#8217;s YAML and MYSQL libraries are also required:&nbsp;<\/p>\n<div class=\"code panel pdl\" style=\"border-width: 1px;\">\n<div class=\"codeContent panelContent pdl\">\n<pre class=\"theme: Confluence; brush: bash; gutter: false\" style=\"font-size:12px;\">pip install pyyaml mysql-connector==2.1.4\n<\/pre>\n<\/div>\n<\/div>\n<h1 id=\"Diagnostiquedel'int\u00e9grit\u00e9desfichierssurlestockage-Lancerlescript\">Run the script<\/h1>\n<p style=\"margin-top: 0.0px;white-space: pre-wrap;\">Download the script here: <a href=\"https:\/\/download.myopenbee.com\/software\/diagnostic\/OBP_datacheck_onpremise.py\" class=\"external-link\" rel=\"nofollow\">https:\/\/download.myopenbee.com\/software\/diagnostic\/OBP_datacheck_onpremise.py<\/a><\/p>\n<div class=\"code panel pdl\" style=\"border-width: 1px;\">\n<div class=\"codeContent panelContent pdl\">\n<pre class=\"theme: Confluence; brush: java; gutter: false\" style=\"font-size:12px;\">wget https:\/\/download.myopenbee.com\/software\/diagnostic\/OBP_datacheck_onpremise.py\nchmod +x OBP_datacheck_onpremise.py<\/pre>\n<\/div>\n<\/div>\n<p>Run the script:&nbsp;<\/p>\n<div class=\"code panel pdl\" style=\"border-width: 1px;\">\n<div class=\"codeContent panelContent pdl\">\n<pre class=\"theme: Confluence; brush: java; gutter: false\" style=\"font-size:12px;\">.\/OBP_datacheck_onpremise.py -c \/var\/www\/openbeeportal\/<\/pre>\n<\/div>\n<\/div>\n<ul style=\"list-style-type: square;\">\n<li>The script takes a single argument which is the Open Bee\u2122 Portal installation&nbsp;path.&nbsp;<\/li>\n<li>The -c &nbsp;option performs a quick check of stored files. Only their presence is checked.&nbsp;<\/li>\n<li>Without the -c option, the HASH of the files is also recalculated and checked<\/li>\n<\/ul>\n<h1 id=\"Diagnostiquedel'int\u00e9grit\u00e9desfichierssurlestockage-R\u00e9sultat\">Result&nbsp;<\/h1>\n<ul style=\"margin-top: 0.0px;white-space: pre-wrap;\">\n<li>A log\/data_check_onprem.log file&nbsp;is created by the script, it contains the same as the output of the script on the screen<\/li>\n<li>With the -c option: The first and last lines of the output indicate the differences between the number of documents stored in the database and the number of documents in the file system. The following lines show the list of files that may be missing<\/li>\n<li>Without the -c option: a log\/data_check_onprem.csv CSV file is created. It contains the list of anomalies and the information of the associated documents (id, path in Open Bee\u2122 Portal, storage path, SHA2 and MD5 fingerprint, etc.)<\/li>\n<\/ul>\n<p><strong><span style=\"color: rgb(255,102,0);\">&nbsp;<\/span><\/strong><\/p>\n<p style=\"margin: 0.0cm;\"><span style=\"font-size: 10.5pt;\">This article details the steps to verify that all files stored on disk by&nbsp;&nbsp;are present and healthy.&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10.5pt;\">It is highly recommended that you run it after restoring a backup.&nbsp;<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article details the steps to verify that all files stored on disk by&nbsp;&nbsp;Open Bee\u2122 Portal&nbsp;are present and have integrity.&nbsp; It is highly recommended that you run it after restoring a backup.&nbsp; Prerequisites Run the script Result&nbsp; Prerequisites The diagnostic tool runs from a console (command-line interface). Python language must be installed.&nbsp; Pyhton&#8217;s YAML and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":20320,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"templates\/ob-help-products.php","meta":{"footnotes":""},"class_list":["post-20329","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/20329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=20329"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/20329\/revisions"}],"predecessor-version":[{"id":22521,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/20329\/revisions\/22521"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/20320"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=20329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}