Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Delimited text backups


A backup of a single table can be a delimited text file: a human-readable text file in which the column values are separated by a specific character. The most common example is the CSV format, where the values are separated by a comma. MariaDB supports the following ways to create text-delimited files:

  • The mysqldump command with the --tab option

  • The SELECT … INTO OUTFILE command

  • The CSV storage engine

  • The CONNECT storage engine

MariaDB also supports the following methods to restore a text limited backup:

  • The mysqlimport command

  • The LOAD DATA INFILE command

  • The CSV storage engine

  • The CONNECT storage engine

The --tab option of the mysqldump command

The mysqldump command, when invoked with the --tab option, produces two files for each dumped table. The name of these files is the name of the original table, followed by an extension. One file has a .sql extension, and it contains the CREATE TABLE statement that is necessary to recreate the empty table. Of course, this file needs...