Skip to content

Commit

Permalink
Add docs for Data Integrity Repair tool (#275)
Browse files Browse the repository at this point in the history
Add documentation for the CLI Data Integrity and Repair tool.
Also removing link to outdated tuning page which has been removed.
  • Loading branch information
anvit committed May 21, 2024
1 parent 7f85837 commit 1b4eabb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
42 changes: 42 additions & 0 deletions admin-manual/maintenance/cli-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,48 @@ terminal.
:ref:`Back to top <maintenance-cli-tools>`
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 <maintenance-cli-tools>`
.. _cli-tools-run:
Run a generic PHP script
Expand Down
1 change: 0 additions & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 1b4eabb

Please sign in to comment.