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:
Each options file must contain the following parameter values:
datadir=... innodb_data_home_dir=... innodb_data_file_path=... innodb_log_group_home_dir=... innodb_log_files_in_group=... innodb_log_file_size=...
The directory paths must be
absolute. Because backup is such a critical procedure, to
avoid the possibility of backing up the wrong files,
ibbackup does not assume any defaults
for file locations.
The number of data files
and their sizes must match in my.cnf and
my2.cnf. For example, if the last data
file is specified as auto-extending in
my.cnf, it must be specified as
auto-extending also in my2.cnf.
The number of log files and
their size must be explicitly specified, but their number
and size can be different between my.cnf
and my2.cnf.
Any other options in these files are ignored. You can prepare new, minimal files with just these options, or use existing configuration files that have the appropriate options.
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.

User Comments
Add your own comment.