# Persistent directories

Certain directories require persistent storage to ensure data integrity and availability across system restarts or scaling events. These persistent directories serve as essential components for storing application data, logs, media files, and maintenance flags.

To facilitate data persistence and maintain consistency across deployments, symbolic links (symlinks) are utilized to connect application directories to their corresponding persistent storage locations. These symlinks ensure that essential data is stored in designated directories on the underlying filesystem.

#### Symlinks Configuration

The following symlinks are established within the application's directory structure to map to persistent storage locations:

**Media Files**:

`/var/www/public/pub/media` -> `/mnt/media`&#x20;

`/home/magento/media` or (`~/media` ) -> `/mnt/media`

**Debug Logs**:&#x20;

`/var/www/public/var/debug` -> `/mnt/var/debug`

**Exported Data**:&#x20;

`/var/www/public/var/export` -> `/mnt/export`

**Imported Data**:&#x20;

`/var/www/public/var/import` -> `/mnt/import`

**Log Files**:&#x20;

`/var/www/public/var/log` -> `/mnt/var/log`

**Error Reports**:

`/var/www/public/var/report` -> `/mnt/var/report`

#### Special Maintenance Flags

In addition to the persistent directories, the applications can utilize special maintenance flags for managing system maintenance operations. These flags are stored in the following locations:

**Maintenance Flag**:

&#x20;`/var/www/public/var/.maintenance.flag` -> `/mnt/var/.maintenance.flag`

**Maintenance IP Whitelist**:&#x20;

`/var/www/public/var/.maintenance.ip` -> `/mnt/var/.maintenance.ip`

For detailed information on maintenance flags and their usage, refer to this [reference](https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/tutorials/maintenance-mode).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.readymage.com/project-development/persistent-directories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
