xtrabackup datadir must be empty - options?

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:


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.



cheers for that. In the end I created mysql/data/ and mysql/backups/ directories which enabled me to keep them separate.