---
title: The data folder
project: OpenSync
version: 1.0
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/opensync/1-0/reference/data-folder/
updated: 2026-11-19T09:22:09.965Z
---

# The data folder

> What OpenSync saves in its databases folder, and how to back it up.

OpenSync keeps everything it saves in the `databases` folder: inside the OpenSync folder for a source install, and in `/www/.src/databases/` in the [Docker image](../../guides/install-docker/).

| File | What it holds |
|---|---|
| `preferences.json` | The instance name, the setup token, the access tokens and the settings of the **Setup** page. |
| `extensions/` | The files of the installed [extensions](../../guides/extensions/). |
| `extensions.json` | The settings of the extensions. |
| `audit.log` | The [request log](../../guides/request-log/), when it is on. |
| `memorize_stats.json` | How many messages each token received. |

Messages are not stored: OpenSync sends them to the connected clients and keeps nothing else, unless the request log is on.

## Back up

Copy the whole folder while OpenSync is stopped, for example:

```bash
tar -czf opensync-backup.tar.gz databases
```

For Docker, copy it out of the container:

```bash
docker cp opensync:/www/.src/databases ./opensync-backup
```

To restore, stop OpenSync, put the folder back and start OpenSync.

`preferences.json` holds your tokens. Keep backups where only you can read them.
