---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/concepts/backup.md
  - https://ydb.tech/docs/ru/concepts/backup.md
sourcePath: en/core/concepts/backup.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Backup Concepts

YDB ensures data durability against hardware failures through [replication and fault tolerance](https://ydb.tech/docs/en/concepts/topology.md#cluster-config). However, replication does not protect against **logical errors**: an accidental `DROP TABLE`, an erroneous bulk `UPDATE`, or `DELETE` will be replicated to all copies. To protect against such scenarios, you need **backups** — separate copies of data that you can restore from.

## Full backups {#full-backup}

A full backup is a snapshot of table data at a specific point in time. YDB provides several ways to create full backups, from simple to more feature-rich.

### Copying tables within the cluster {#copy-table}

The simplest approach is to create a copy of one or more tables within the same cluster using [`ydb tools copy`](https://ydb.tech/docs/en/reference/ydb-cli/tools-copy.md). The copy is created atomically from a consistent snapshot using a copy-on-write mechanism, making the operation fast.

Suitable for:

- creating a quick safety copy before a risky operation
- cloning data for testing

{% note warning %}

The copy is stored in the same cluster as the source data. It protects against logical errors but not against cluster loss.

{% endnote %}

### Dump to filesystem {#dump}

The [`ydb tools dump`](https://ydb.tech/docs/en/reference/ydb-cli/export-import/tools-dump.md) and [`ydb tools restore`](https://ydb.tech/docs/en/reference/ydb-cli/export-import/tools-restore.md) commands allow you to export data to the local filesystem and restore it back.

Suitable for:

- local development and testing
- small databases
- creating a copy on a separate storage medium

### Export to S3-compatible storage {#s3}

The [`ydb export s3`](https://ydb.tech/docs/en/reference/ydb-cli/export-import/export-s3.md) and [`ydb import s3`](https://ydb.tech/docs/en/reference/ydb-cli/export-import/import-s3.md) commands allow you to export and import data to external S3-compatible storage.

Suitable for:

- disaster recovery (data is stored outside the cluster)
- data migration between clusters
- long-term archival

## Incremental backups {#incremental-backup}

For large tables, repeatedly creating full backups can be too expensive. Incremental backups solve this: after an initial full backup, each subsequent increment captures only the changes (inserts, updates, deletes) that occurred since the previous backup.

Incremental backups are organized into a **chain**:

```text
Full backup → Increment₁ → Increment₂ → ... → Incrementₙ
```

Restoration requires the entire chain: the full backup is applied first, then all increments in sequence. Recovery restores data to the state at the time of the last increment in the chain.

Incremental backups are implemented using [backup collections](#backup-collections).

{% note info %}

Currently only [row-oriented tables](https://ydb.tech/docs/en/concepts/datamodel/table.md#row-oriented-tables) are supported.

{% endnote %}

## Backup collections {#backup-collections}

For details on backup collections, see [Backup collections](https://ydb.tech/docs/en/concepts/datamodel/backup-collection.md).

## Comparison {#comparison}

#|
|| **Method** | **Storage location** | **Incremental** | **Use cases** ||
|| [Copying tables within the cluster](#copy-table) | In cluster | No | Quick copy before a risky operation ||
|| [Dump to filesystem](#dump) | Filesystem | No | Development, testing, small databases ||
|| [Export to S3-compatible storage](#s3) | S3-compatible storage | No | Disaster recovery, migration, archival ||
|| [Incremental backups](#incremental-backup) | In cluster ([exportable](https://ydb.tech/docs/en/concepts/datamodel/backup-collection.md#external-storage) to S3 or filesystem) | Yes | Regular backups of large production databases ||
|#

## See Also

- [Backup collections](https://ydb.tech/docs/en/concepts/datamodel/backup-collection.md) — architecture and limitations
- [Backup and Recovery](https://ydb.tech/docs/en/devops/backup-and-recovery.md) — practical operations guide
- [Export/import reference](https://ydb.tech/docs/en/reference/ydb-cli/export-import/index.md) — CLI commands
- YQL reference:
  - [`CREATE BACKUP COLLECTION`](https://ydb.tech/docs/en/yql/reference/syntax/create-backup-collection.md)
  - [`BACKUP`](https://ydb.tech/docs/en/yql/reference/syntax/backup.md)
  - [`RESTORE`](https://ydb.tech/docs/en/yql/reference/syntax/restore-backup-collection.md)
  - [`DROP BACKUP COLLECTION`](https://ydb.tech/docs/en/yql/reference/syntax/drop-backup-collection.md)
