Description\n-----------\n\nThe BACKUP STAGE statements are a set of statements to make it possible to make an efficient external backup tool. These commands could even be used by tools that perform backups by taking a snapshot of a file system, SAN, or some other kind of storage device.\n\nGeneric Backup Process with Storage Snapshots\n\nA tool that backs up MariaDB by taking a snapshot of a file system, SAN, or some other kind of storage device could use each BACKUP STAGE command in the following way:\n\n First, execute the following:\n\n``sql\nBACKUP STAGE START\nBACKUP STAGE BLOCK_COMMIT\n`\n\n Then, take the snapshot.\n* Then, execute the following:\n\n`sql\nBACKUP STAGE END\n`\n\nThe above ensures that all non-transactional tables are properly flushed to disk before the snapshot is done. Using BACKUP STAGE commands is also more efficient than using the FLUSH TABLES WITH READ LOCK command as the above set of commands will not block or be blocked by write operations to transactional tables.\n\nNote that when the backup is completed, one should delete all files with the "#sql" prefix, as these are files used by concurrent running ALTER TABLE`. Note that InnoDB will on server restart automatically delete any tables with the "#sql" prefix.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/backup-commands/storage-snapshots-and-backup-stage-commands