Backup and recovery
Backups protect against data loss by letting you restore data.
YDB provides multiple solutions for backup and recovery:
- Backing up data to files and restoring it using the YDB CLI.
- Backing up data to S3-compatible storage and restoring it using the YDB CLI.
YDB CLI
Files
To back up data to a file, the following commands are used:
ydb admin cluster dump
— to back up a cluster' metadataydb admin database dump
— to back up a databaseydb tools dump
— to back up individual schema objects or directories
To learn more about these commands, see Exporting data to the file system.
To restore data from a backup, the following commands are used:
ydb admin cluster restore
— to restore a cluster' metadata from a backupydb admin database restore
— to restore a database from a backupydb tools restore
— to restore individual schema objects or directories from a backup
To learn more about these command, see Importing data from the file system.
S3-compatible storage
To back up data to S3-compatible storage (such as AWS S3), run the ydb export s3
command. To learn more about this command, follow the link to the YDB CLI reference.
To restore data from a backup created in S3-compatible storage, run the ydb import s3
command. To learn more about this command, follow the link to the YDB CLI reference.
Was the article helpful?
Previous
Next