Backup
Database backup allows to instantly attach table/database from backups in read-only mode.
Database backup works with both incremental and non-incremental backups.
Creating a Database
Backup destination can be any valid backup destination like Disk
, S3
, File
.
With Disk
backup destination, query to create database from backup looks like this:
Engine Parameters
database_name_inside_backup
— Name of the database inside the backup.backup_destination
— Backup destination.
Usage Example
Let's make an example with a Disk
backup destination. Let's first setup backups disk in storage.xml
:
Example of usage. Let's create test database, tables, insert some data and then create a backup:
So now we have test_database_backup
backup, let's create database Backup:
Now we can query any table from database:
It is also possible to work with this database Backup as with any ordinary database. For example query tables in it: