---
title: "Persistent storage"
description: "Keep data between deployments with OnePloy persistent storage: volume, file and directory mounts plus scheduled backups to S3-compatible storage."
url: https://oneploy.dev/docs/applications/persistent-storage/
type: op_doc
published: 2026-11-02T19:09:47+00:00
updated: 2026-11-02T19:11:23+00:00
author: "admin"
language: en-US
---

# Persistent storage

> Keep data between deployments with OnePloy persistent storage: volume, file and directory mounts plus scheduled backups to S3-compatible storage.

Containers are replaced on every deployment, so anything written inside them is lost unless it lives in persistent storage. Add a volume mount, directory mount or file mount on the application’s **Persistent storage** page to keep uploads, SQLite files, caches or configuration between deployments.

## Which mount type should I use?

| Type | What it does | Typical use |
| --- | --- | --- |
| Volume mount | A Docker volume managed by the server, mounted at a path in the container. | Uploads, application data, SQLite databases. |
| Directory mount | A directory on the server’s filesystem mounted into the container. | Data you also want to reach from the host. |
| File mount | A single file whose content you edit in OnePloy, written to the server and mounted into the container. | Configuration files such as `nginx.conf` or `php.ini`. |

## How do I add persistent storage?

1. Open the application and go to **Persistent storage**.
2. Add a volume, directory or file mount.
3. Enter the destination path inside the container, for example `/app/storage`. For a directory mount also enter the source path on the server. For a file mount enter the file content.
4. Redeploy the application so the new container is created with the mount.

## What happens to storage in preview deployments?

Volumes can receive an isolated `-pr-N` suffix for each [preview deployment](https://oneploy.dev/docs/applications/preview-deployments/), so pull request builds never write into production data.

## How do I back up persistent storage?

Volume and directory mounts can be backed up on a schedule.

1. Open the application’s **Backups** page (for services, **Storage backups**).
2. Create a scheduled backup and choose the volume or directory as the backup target.
3. Set a frequency, for example daily.
4. Optionally enable saving to an S3 storage so copies leave the server. Add the bucket first under **S3 Storage**.

Each run is listed under the backup’s executions. Backups saved only locally stay on the same server as the data, so use S3 for anything you cannot afford to lose.

## Can I manage storage through the API?

Yes. Applications, services and databases each expose `storages` endpoints to list, create, update and delete mounts, plus endpoints to configure and run storage backups, for example `POST /api/v1/applications/{uuid}/storages/{storage_uuid}/backups/run`. See the [API overview](https://oneploy.dev/docs/api/).

**Warning:** Deleting a volume mount from an application can delete the data in it. Take a backup first.

---

Source: https://oneploy.dev/docs/applications/persistent-storage/ · OnePloy
