It seems xtrabackup is not backing up binary logs, although it creates xtrabackup_binlog* with apparently correct information inside. Should the binary logs be copied manually beforehand or is this a bug?
-
1xtrabackup is not supposed to copy binary logs. It creates a which is InnoDB redo log (similar to ib_logfile*) only. The file you see contains binlog coordinates so you can create a slave out of the backup copy.– akuzminskyJun 20, 2014 at 14:17
-
so how are you supposed to start the slave without the binlogs? Create empty binlog index by hand?– sivannJun 20, 2014 at 14:50
-
1you run CHANGE MASTER on the slave– akuzminskyJun 20, 2014 at 14:52
-
Restored DB won't even start without the binlogs– sivannJun 20, 2014 at 16:26
-
1I'll tell you more. On a slave binary log may be not enabled at all. I think you're confused about how replication works.– akuzminskyJun 20, 2014 at 16:38
1 Answer
When using xtrabackup
the binary logs aren't copied per file (but in one binlogfile).
You need to restore this differently, see docs: Preparing a Full Backup with innobackupex.
Or, with more extensive explanations:
- Percona documentation - Prepare with xtrabackup
- Percona documentation - Restore with xtrabackup
In relation to your database not starting after restore, you might want to paste your my.cnf
and server log hostname.err
.