Discuss your project
Linux Ubuntu 14.04 LTS Ubuntu 16.04 LTS

Import a database from an all-database dump

This command connects to the MySQL database server as the root user with the password 'toor'. It targets the server running on 'localhost', selects the database named 'caue_edp', and directs the output to the same 'caue_edp' database from the SQL dump file...

Étapes de contrôle d’une restauration de données

This command connects to the MySQL database server as the root user with the password 'toor'. It targets the server running on 'localhost', selects the database named 'caue_edp', and directs the output to the same 'caue_edp' database from the SQL dump file 'all-mysql-databases.20181005.sql'.

Étapes de contrôle d’une restauration de données

Secure the import

A global dump can contain multiple databases, accounts, or instructions incompatible with the target. Inspect its header and size before importing, then work on an isolated instance.

gzip -t sauvegarde.sql.gz
zgrep -m 5 -E '^(CREATE DATABASE|USE )' sauvegarde.sql.gz

Keep a verified backup of the target, check the disk space, and compare the data volumes after restoration before reopening the application.

Share this article