Not the answer you need?
Register and ask your own question!

xtrabackup datadir must be empty - options?

IGGtIGGt EntrantCurrent User Role Novice
In the Documentation for XtraBackup it says that

The datadir must be empty; Percona XtraBackup innobackupex --copy-back option will not copy
over existing files.

Is there any way round this?

My DataDir is ` directory but it still wont copy-back, giving error:

.

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi IGGt;

    You can just manually move the files yourself. However if you leave the backups directory in the data directory, it will show up in MySQL as a defunct database (i.e. the "lost+found" you see often). In MySQL 5.6.3+ you can use the ignore-db-dir option to ignore the backups directory, but if you are running 5.5 then I'd figure out how to store your backups somewhere else preferably.

    http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_ignore-db-dir

    -Scott
  • IGGtIGGt Entrant Current User Role Novice
    cheers for that. In the end I created mysql/data/ and mysql/backups/ directories which enabled me to keep them separate.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.