4.1.9 Partial Backup Options

For an overview of partial backups and usage information about these options, see Section 3.3.4, “Making a Partial Backup”.

--include=REGEXP

Back up only those InnoDB tables whose fully qualified names match a regular expression. If the REGEXP matches db_name.table_name, the table is included. The regular expression syntax is the extended form specified in the POSIX 1003.2 standard.

For example, --include=mydb.t[12] matches the tables t1 and t2 in the database mydb. Only applies to InnoDB tables created with the MySQL option innodb_file_per_table enabled, which are in separate files that can be included or excluded from the backup. All tables in the InnoDB system tablespace are always backed up.

Default: Backs up all InnoDB tables.

--databases=LIST

Filters the list of non-InnoDB tables to back up. To filter InnoDB tables, use the --include option. The argument specifies a space-separated list of database/table names of the following form:

"db_name[.table_name] db_name1[.table_name1] ...".

If this option is not specified, all databases are backed up. If the specified database does not match any database or table, then all databases are backed up. See Section 3.3.4.2, “Backing Up Selected Databases” for details.

By default, all databases are backed up.

--databases-list-file=PATH

Filters the list of non-InnoDB tables to back up. The specified file contains entries for databases or fully qualified table names separated by newline or space. The format of the entries is the same as for the --databases option:

   db_name[.table_name]
   db_name1[.table_name1]
   ...

If this option is not specified, all databases are backed up. If the specified entries do not match any database or table, then all databases are backed up.

Pathname to the file that contains the list of databases to be backed up separated by newlines. Remove any surrounding whitespace, because those characters are not removed automatically. Begin a line with the # character to include a comment. No regular expressions are allowed.

By default, all tables are backed up.

--only-known-file-types

By default, all files in the data directory are included in the backup. (See Section 1.4, “Files that Are Backed Up” for details.) If the --only-known-file-types option is specified, the backup includes only the files with these file extensions:

  • .ARM: Archive storage engine metadata.

  • .ARZ: Archive storage engine data.

  • .CSM: CSV storage engine data.

  • .CSV: CSV storage engine data.

  • .frm: table definitions.

  • .MRG: Merge storage engine references to other tables.

  • .MYD: MyISAM data.

  • .MYI: MyISAM indexes.

  • .OPT: database configuration. information

  • .PAR: partition definitions.

  • .TRG: trigger parameters.

  • .TRN: trigger namespace information.

--only-innodb

Back up only InnoDB data and log files. All .frm files and files created by other storage engines are excluded. Typically used when no connection to mysqld is allowed or when there is no need to copy MyISAM or .frm files, for example, when you are sure there are no DDL changes during the backup. See Section 3.3.4.1.2, “Backing Up Only InnoDB Tables” for instructions and examples.

Can be used in combination with the --suspend-at-end option to allow customized scripting at the end of backup.

Default: backups include files from all storage engines.