Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ it undergoes a controlled recovery process:
is reused on subsequent recoveries, meaning **only one backup copy is kept at
a time**.

Use the `--storage-enable-backup-dir` flag to control this behavior:
- `true` (default) - Old durability files are moved to `.old` directories
- `false` - Old durability files are deleted immediately

---

The possibility of data loss during failover depends on the configured
Expand Down
15 changes: 15 additions & 0 deletions pages/database-management/backup-and-restore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,21 @@ Execute `RECOVER SNAPSHOT <path_to_snapshot> FORCE`

</Steps>

## Usage of .old directory

By default, Memgraph backs up durability files to `snapshots/.old` and `wal/.old` directories before operations that could risk data loss.

When backup occurs:

1. `RECOVER SNAPSHOT` query - Before loading an external snapshot, Memgraph moves existing files from `snapshots/` to `snapshots/.old` and from `wal/` to `wal/.old`. T
his protects your data if the newly loaded snapshot turns out to be corrupted.
2. High Availability force sync - During replica's force syncing. See [this page](/clustering/high-availability/how-high-availability-works#replication-scenarios) for details.

Configuration:

Use the `--storage-enable-backup-dir` flag to control this behavior:
- `true` (default) - Old durability files are moved to `.old` directories
- `false` - Old durability files are deleted immediately

## Best practices

Expand Down
1 change: 1 addition & 0 deletions pages/database-management/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ in Memgraph.
| `--storage-property-store-compression-enabled=false` | Controls whether the properties should be compressed in the storage. | `[bool]` |
| `--storage-property-store-compression-level=mid` | Controls property store compression level. Allowed values: low, mid, high | `[string]` |
| `--storage-access-timeout-sec=1` | Storage access timeout in seconds. Used to fine-tune the responsiveness and guard against queries indefinitely waiting. | `[uint64]` |
| `--storage-enable-backup-dir=true` | Controls whether `.old` directory will be used to store backup. | `[bool]` |

### Streams

Expand Down