How to archive documents?

Tabla de contenidos

Athento allows you to archive documents that you do not want to permanently delete but that are not expected to be accessed frequently. Archiving documents is a good practice to maintain database health and to make your search queries much faster.

Athento archives documents in MongoDB. Archiving can be done manually or automated.

Documents can be archived in two different ways:

  • From the document view. If you have superuser permissions, the option to archive to Mongo will be available in the “other actions” dropdown menu.image (14).pngimage (14).png
  • From the command line.
python manage.py archive_files_to_mongo
    • Parameters:
      • date. Required. Files whose modification date is earlier than this date will be archived. It must be specified in the format: %d-%m-%Y. E.g.: 15-06-2024
      • archive. If this parameter is not specified, the documents will not be archived; if this parameter is not sent, only the numbers of documents that are going to be archived will be shown in the log.

Listing and searching archived documents

Documents archived in Athento can be seen in a tab called ‘document archive‘.
image (15).png

In this tab you can filter using the search box that is at the top right of the tab. This search is performed by document title, document uuid, and metadata. The search is case-insensitive.
image (16).png
You can also unarchive any document from this tab.image_720.png

**Note: Documents with metadata of type document, or type choice or multichoice and subtype document will not be archived. In addition, documents referenced in any metadata will not be archived.