Just wanted to +1 this. I have a client with multiple databases but only wants 1 backed up. If I use --databases=dbToBackUp, I still get all other databases' .ibd files as demonstrated in #1274766.
Additionally, different behavior is experienced during the file phase of backups (during the .frm, MYI, MYD part). If I specify --databases=alex_and_ani_enterprise_live_new_theme, I see this:
140819 02:12:02 innobackupex: Continuing after ibbackup has suspended
140819 02:12:02 innobackupex: Executing FLUSH TABLES WITH READ LOCK...
>> log scanned up to (1286337694402)
140819 02:12:03 innobackupex: All tables locked and flushed to disk
140819 02:12:03 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/mnt/san/mysql/mysql'
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_enterprise_live_new_theme/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (700 files)
>> log scanned up to (1286337694402)
140819 02:12:04 innobackupex: Finished backing up non-InnoDB tables and files
140819 02:12:04 innobackupex: Executing FLUSH ENGINE LOGS...
140819 02:12:04 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '1286337692872'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1286337694402)
xtrabackup: Creating suspend file '/mnt/san/backups/20140819_full/xtrabackup_log_copied' with pid '25308'
xtrabackup: Transaction log of lsn (1286331699845) to (1286337694402) was copied.
140819 02:12:05 innobackupex: All tables unlocked
==== But if I do this, --include='^alex_and_ani_enterprise_live_new_theme\.*' I see this:
140819 09:29:05 innobackupex: Executing FLUSH TABLES WITH READ LOCK...
>> log scanned up to (1286949139524)
140819 09:29:05 innobackupex: All tables locked and flushed to disk
140819 09:29:05 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/mnt/san/mysql/mysql'
innobackupex: Backing up files '/mnt/san/mysql/mysql/performance_schema/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (18 files)
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_test_db/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (534 files)
innobackupex: Backing up files '/mnt/san/mysql/mysql/mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (72 files)
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_magento_loadtesting/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (700 files)
percona.checksums.frm is skipped because it does not match '^alex_and_ani_enterprise_live_new_theme\.*'.
percona.db.opt is skipped because it does not match '^alex_and_ani_enterprise_live_new_theme\.*'.
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_wordpress_loadtesting/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (34 files)
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_wordpress_staging/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (34 files)
innobackupex: Backing up files '/mnt/san/mysql/mysql/alex_and_ani_enterprise_live_new_theme/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (700 files)
>> log scanned up to (1286949140220)
140819 09:29:07 innobackupex: Finished backing up non-InnoDB tables and files
140819 09:29:07 innobackupex: Executing FLUSH ENGINE LOGS...
140819 09:29:07 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '1286948928913'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1286949140230)
xtrabackup: Creating suspend file '/mnt/san/backups/2014-08-19_09-25-23/xtrabackup_log_copied' with pid '17663'
xtrabackup: Transaction log of lsn (1286942225085) to (1286949140230) was copied.
140819 09:29:08 innobackupex: All tables unlocked
These two should be mutually exclusive and, in effect, produce the same result and similar log entries:
Just wanted to +1 this. I have a client with multiple databases but only wants 1 backed up. If I use --databases= dbToBackUp, I still get all other databases' .ibd files as demonstrated in #1274766.
Additionally, different behavior is experienced during the file phase of backups (during the .frm, MYI, MYD part). If I specify --databases= alex_and_ ani_enterprise_ live_new_ theme, I see this:
140819 02:12:02 innobackupex: Continuing after ibbackup has suspended
140819 02:12:02 innobackupex: Executing FLUSH TABLES WITH READ LOCK...
>> log scanned up to (1286337694402)
140819 02:12:03 innobackupex: All tables locked and flushed to disk
140819 02:12:03 innobackupex: Starting to backup non-InnoDB tables and files mysql/mysql' mysql/mysql/ alex_and_ ani_enterprise_ live_new_ theme/* .{frm,isl, MYD,MYI, MAD,MAI, MRG,TRG, TRN,ARM, ARZ,CSM, CSV,opt, par}' (700 files)
innobackupex: in subdirectories of '/mnt/san/
innobackupex: Backing up files '/mnt/san/
>> log scanned up to (1286337694402)
140819 02:12:04 innobackupex: Finished backing up non-InnoDB tables and files
140819 02:12:04 innobackupex: Executing FLUSH ENGINE LOGS...
140819 02:12:04 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '1286337692872'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1286337694402)
xtrabackup: Creating suspend file '/mnt/san/ backups/ 20140819_ full/xtrabackup _log_copied' with pid '25308'
xtrabackup: Transaction log of lsn (1286331699845) to (1286337694402) was copied.
140819 02:12:05 innobackupex: All tables unlocked
==== But if I do this, --include= '^alex_ and_ani_ enterprise_ live_new_ theme\. *' I see this:
140819 09:29:05 innobackupex: Executing FLUSH TABLES WITH READ LOCK...
>> log scanned up to (1286949139524)
140819 09:29:05 innobackupex: All tables locked and flushed to disk
140819 09:29:05 innobackupex: Starting to backup non-InnoDB tables and files mysql/mysql' mysql/mysql/ performance_ schema/ *.{frm, isl,MYD, MYI,MAD, MAI,MRG, TRG,TRN, ARM,ARZ, CSM,CSV, opt,par} ' (18 files) mysql/mysql/ alex_and_ ani_test_ db/*.{frm, isl,MYD, MYI,MAD, MAI,MRG, TRG,TRN, ARM,ARZ, CSM,CSV, opt,par} ' (534 files) mysql/mysql/ mysql/* .{frm,isl, MYD,MYI, MAD,MAI, MRG,TRG, TRN,ARM, ARZ,CSM, CSV,opt, par}' (72 files) mysql/mysql/ alex_and_ ani_magento_ loadtesting/ *.{frm, isl,MYD, MYI,MAD, MAI,MRG, TRG,TRN, ARM,ARZ, CSM,CSV, opt,par} ' (700 files) checksums. frm is skipped because it does not match '^alex_ and_ani_ enterprise_ live_new_ theme\. *'. and_ani_ enterprise_ live_new_ theme\. *'. mysql/mysql/ alex_and_ ani_wordpress_ loadtesting/ *.{frm, isl,MYD, MYI,MAD, MAI,MRG, TRG,TRN, ARM,ARZ, CSM,CSV, opt,par} ' (34 files) mysql/mysql/ alex_and_ ani_wordpress_ staging/ *.{frm, isl,MYD, MYI,MAD, MAI,MRG, TRG,TRN, ARM,ARZ, CSM,CSV, opt,par} ' (34 files) mysql/mysql/ alex_and_ ani_enterprise_ live_new_ theme/* .{frm,isl, MYD,MYI, MAD,MAI, MRG,TRG, TRN,ARM, ARZ,CSM, CSV,opt, par}' (700 files)
innobackupex: in subdirectories of '/mnt/san/
innobackupex: Backing up files '/mnt/san/
innobackupex: Backing up files '/mnt/san/
innobackupex: Backing up files '/mnt/san/
innobackupex: Backing up files '/mnt/san/
percona.
percona.db.opt is skipped because it does not match '^alex_
innobackupex: Backing up files '/mnt/san/
innobackupex: Backing up files '/mnt/san/
innobackupex: Backing up files '/mnt/san/
>> log scanned up to (1286949140220)
140819 09:29:07 innobackupex: Finished backing up non-InnoDB tables and files
140819 09:29:07 innobackupex: Executing FLUSH ENGINE LOGS...
140819 09:29:07 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '1286948928913'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1286949140230)
xtrabackup: Creating suspend file '/mnt/san/ backups/ 2014-08- 19_09-25- 23/xtrabackup_ log_copied' with pid '17663'
xtrabackup: Transaction log of lsn (1286942225085) to (1286949140230) was copied.
140819 09:29:08 innobackupex: All tables unlocked
These two should be mutually exclusive and, in effect, produce the same result and similar log entries:
--databases= myDbToBackup && --include= '^myDbToBackup. *'