This tab allows you to specify the general parameters of a backup project, that is everything except for which data should actually be backed up. The latter can be specified in the Backup Content tab.
Remember to press the
button to store the project you are editing. If you do not want to store the project, press the button. Pressing the button will use the values that are currently entered in the fields, but it will not store those values permanently. If you want to create a new backup project, press the button.General
Project Name: Specify a name that clearly denotes the project, like Everything on remotehost or DB_test_world. The project name may contain arbitrary characters, including spaces.
Target Directory: Specify the directory where the backup file should be stored. You may select the target directory by clicking the
button. It is recommendable to store the backup file on a harddisk other than the one the MySQL server uses. It is even better to store it on a different machine.Filename Prefix: Specify a prefix for the backup filename. By default, MySQL Administrator will use the project name as the filename prefix.
Backup Type: Specify what kind of backup file should be generated. At the moment, the only option is SQL Files. That option will create a file that contains SQL statements that allow to re-create schemata, tables, and their contained data. The contents of that file might look like this:
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `world`; USE `world`; CREATE TABLE `country` ( `Code` char(3) NOT NULL default '', `Name` char(52) NOT NULL default '', ... `Capital` int(11) default NULL, `Code2` char(2) NOT NULL default '', PRIMARY KEY (`Code`) ) TYPE=InnoDB; LOCK TABLES `country` WRITE; INSERT INTO `country` VALUES ('ABW','Aruba','North America','Caribbean','193.00','0','103000','78.4','828.00','793.00','Aruba','Nonmetropolitan Territory of The Netherlands','Beatrix','129','AW'), ... UNLOCK TABLES; CREATE TABLE `countrylanguage` ( `Country` char(3) NOT NULL default '', ...
The filename will be composed from the filename prefix, a timestamp, and an .sql extension. If your project name is Everything on remotehost, and you start the backup on February 3, 2004, at 1.15 in the afternoon, it will look like this:
Everything on remotehost 20040203 1315.sql
Backup selected Schematas completely: [SH] Mike: Either Schematas -> Schemata, or Schematas -> Schemas In the Backup Content tab, you can choose which schemata (databases) and tables you would like to back up. If this checkbox is activated, the schemata (databases) you select will always be backup up completely, that is including all their tables. If you select only particular tables within schemata, that choice will be ignored.
Output Options
These options allow you to fine-tune the output generated by the backup process.
No CREATEs: [SH] Mike: CREATES -> CREATEs If enabled, no CREATE TABLE statements will be generated. This is useful if you want only rows (data) to be backup up. Enabling this checkbox corresponds to specifying the --no-create-info option to the mysqldump program.
No extended INSERTs: MySQL understands INSERT statements that insert more than one row at a time. Those INSERTs can be significantly faster. They may, however, lead to problems when inserting either long rows, or very many rows. Enabling this checkbox will make MySQL Administrator use regular INSERTs, that is one row per statement. Disabling this checkbox corresponds to specifying the --extended-insert option to the mysqldump program.
Add DROP TABLE Statements: Normally, a restore from a backup will fail when a CREATE TABLE statement is encountered that tries to create a table that already exists. Enabling this checkbox will make MySQL Administrator write a DROP TABLE line before each CREATE TABLE statement, so that on restore an existing table is removed before it is re-created. Enabling this checkbox corresponds to specifying the --add-drop-table option to the mysqldump program.
Complete INSERTs: If enabled, INSERT statements will contain column names, like this:
INSERT INTO tbl (column1, column2) VALUES (value1, value2);
Comment: If disabled, MySQL Administrator suppresses additional information (like program version, server version, host) in backup files. This corresponds to the --skip-comments option or to setting --comments=0 in the mysqldump program. Note that this option is available only in MySQL servers as of version 4.0.17.
Don't write full path: [SH] Mike: No idea what this option does.
ANSI Quotes: [SH] Mike: No idea what this option does.
Lock all Tables: If enabled, MySQL Administrator will place a write lock on tables before inserting data; that is, it will write a line before INSERT statements that looks like this:
LOCK TABLE tbl WRITE;
Note that when using this option you cannot use the Single Transaction option. [SH] Mike: This is a bug. You can select both options. The manual says (about Single Transaction): "This option is mutually exclusive with the --lock-tables option as LOCK TABLES already commits a previous transaction internally." Enabling this checkbox corresponds to specifying the --lock-tables option to the mysqldump program.
Single Transaction: If enabled, MySQL Administrator issues a BEGIN statement before retrieving data from the MySQL server. It is mostly useful with InnoDB tables and READ_COMMITTED transaction isolation level, as in this mode it will dump the consistent state of the database at the time when BEGIN was issued, without blocking any applications. When using this option you should keep in mind that only transactional tables will be backed up in a consistent state; any MyISAM or HEAP tables, for example, that are backup up while using this option may still change state. Not that when using this option you cannot use the Lock all Tables option at the same time. Also note that this option is available as of MySQL 4.0.2 only. It corresponds to specifying the --single-transaction option to the mysqldump program.
Disable Keys: If enabled, MySQL Administrator writes the following lines in the backup file:
/*!40000 ALTER TABLE tb_name DISABLE KEYS */; /*!40000 ALTER TABLE tb_name ENABLE KEYS */;
The first line is written before the first INSERT statement that inserts data into a table, and the last line is written after the last INSERT statement that inserts data into a table. This will make restoring the data into a MySQL server faster, as the indexes are created after all data are inserted.