From 1b4eabb3cbedf1f809173da87997261770ff2d6a Mon Sep 17 00:00:00 2001 From: Anvit Srivastav Date: Tue, 21 May 2024 16:37:40 -0700 Subject: [PATCH] Add docs for Data Integrity Repair tool (#275) Add documentation for the CLI Data Integrity and Repair tool. Also removing link to outdated tuning page which has been removed. --- admin-manual/maintenance/cli-tools.rst | 42 ++++++++++++++++++++++++++ index.rst | 1 - 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/admin-manual/maintenance/cli-tools.rst b/admin-manual/maintenance/cli-tools.rst index 5994a134..f937510f 100644 --- a/admin-manual/maintenance/cli-tools.rst +++ b/admin-manual/maintenance/cli-tools.rst @@ -2728,6 +2728,48 @@ terminal. :ref:`Back to top ` +Find data integrity issues +========================== + +Tries to find data integrity issues in the AtoM database, and attempts to repair +them if requested. + +.. code:: bash + + php symfony tools:data-integrity-repair /path/to/report/filename.csv + + +The data integrity and repair task does the following: + +* Adds missing object rows for all resources extending QubitObject +* Regenerates slugs to use them in CSV report +* Adds missing parent ids to terms +* Checks descriptions with missing data and provides options for attempting to + generate a list, fix them, or delete them +* Re-builds the nested sets + +If the tool finds any records that have problems, they will be listed in a CSV +report file. By default, the task saves them in a file named +``affected-records.csv`` but a custom filename and path can be specified if the +user wants to save this in a different location. + +The ``--application``, ``--env``, and ``connection`` options **should not be +used** - AtoM requires the uses of the pre-set defaults for Symfony to be +able to execute the task. + +The data integrity repair tool has 3 modes. By default it only generate reports, +but it can also attempt to fix or delete affected records: + +.. code:: bash + + php symfony tools:data-integrity-repair file/path/to/report.csv --mode=fix + +.. code:: bash + + php symfony tools:data-integrity-repair file/path/to/report.csv --mode=delete + +:ref:`Back to top ` + .. _cli-tools-run: Run a generic PHP script diff --git a/index.rst b/index.rst index a4625efb..4bbc3d6e 100644 --- a/index.rst +++ b/index.rst @@ -226,7 +226,6 @@ Maintenance * :ref:`maintenance-populate-search-index` * :ref:`maintenance-data-backup` * :ref:`common-atom-queries` -* :ref:`maintenance-tuning` * :ref:`maintenance-asynchronous-jobs` * :ref:`maintenance-troubleshooting` * :ref:`debug-mode`