# Support or multple innodb data file locations

**URL:** <https://forums.percona.com/t/support-or-multple-innodb-data-file-locations/2273>\
**Category:** Percona XtraBackup\
**Created:** [July 31, 2012, 3:33pm UTC](https://forums.percona.com/t/support-or-multple-innodb-data-file-locations/2273 "2012-07-31T15:33:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilmcgrath](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gilmcgrath](https://forums.percona.com/u/gilmcgrath)\
**Post date:** [July 31, 2012, 3:33pm UTC](https://forums.percona.com/t/support-or-multple-innodb-data-file-locations/2273/1 "2012-07-31T15:33:41Z")

</div>

I have a question:

First some background:

I have DB where the data files are on NFS and for network throughput and performance reasons has the main data\_dir that holds ib\_logfiles, schema and bin-logs on one NFS mount point and the innodb data files (three of them) spread across 3 other NFS mount points for a total of 4 mount points. FYI this type configuration was also recommended in a netapp mysql best practices white paper.

innobackupex seems to backup the database just fine - although it does place all the ibdata files in the base backup directory. However, I can not get innobackupex copy-back to work. It always returns an error stating the “Original InnoDB data directory is not empty! at /opt/mysql/backup/bin/innobackupex line 571.”.

Question:

Am I correct with the deduction that innbackupex or at least the copy-back function does not support a database with more than a single location for innodb data files?

Observation:  
With multiple locations for innodb data files I have two options for setting innodb\_data\_home\_dir:

innodb\_data\_home\_dir =

# this option is used when the path names for the data files are absolute and not relative

# innbackupex --copy-back does not like this at all if this attribute is set this way in my.cnf. Innobackupex wants this attribute (if present) to be non-null.

or

innodb\_data\_home\_dir = base\_path

# this is used when the data file names are relative and it prepends this base\_path to the relative paths of the data files meaning that when this is specified with multiple mount points for data files this base directory can never be “empty” which innobackupex expects.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![revin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/revin/32/824_2.png) [@revin](https://forums.percona.com/u/revin)\
**Post date:** [August 11, 2012, 9:35pm UTC](https://forums.percona.com/t/support-or-multple-innodb-data-file-locations/2273/2 "2012-08-11T21:35:56Z")

</div>

innobackupex copy backup function takes only the basename from innodb\_data\_file\_path i.e. ibdata1, ibdata2 and copies them back to the datadir. It does not support copying back to whatever innodb\_data\_home\_dir+innodb\_data\_file\_path or the full path from innodb\_data\_file\_path - you have to copy back manually for this.
