3.1 Options Files

You specify two filenames on the ibbackup command line. These .cnf files represent MySQL options files and use similar syntax. These options file have the following requirements:

For example, suppose your my.cnf contains the following:

[mysqld]
datadir = /home/heikki/data
innodb_data_home_dir = /home/heikki/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/heikki/data
innodb_log_files_in_group=2
innodb_log_file_size=20M

To back up your database to directory /home/heikki/backup, create my2.cnf like the following:

datadir = /home/heikki/backup
innodb_data_home_dir = /home/heikki/backup
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/heikki/backup
innodb_log_files_in_group=2
innodb_log_file_size=20M

Because ibbackup does not overwrite any files during the initial backup step, the backup directory must not contain any old backup files. ibbackup stops when asked to create a file that already exists, to avoid harming an existing backup.