Some info about ib_logfile0 and ib_logfile1

Hello everyone,

I’m new to this backup and sorry if the question is dumb. After executing the backup command:

innobackupex --user=xxxx --password=xxxxxxx /var/lib/mysql_backup

it ended up with: innobackupex: completed OK!

so far so good, but i looked at the folder’s size and it was 355 MB , but earlier backups are 4,1 GB. When i opened them they had these two files: ib_logfile0 and ib_logfile1, which are missing in the new backup folder.

Can you explain me what are these and why are they missing in the new backup folder?

The log files will be missing until you prepare the backup.
The size still seems very small - do you have very large log files?

This is what’s in the folder of the previous backup that was created:

4.0K backup-my.cnf
58M ibdata1
2.1G ib_logfile0
2.1G ib_logfile1
1.0M mysql
212K performance_schema
7.1M radius
27M xbench
4.0K xtrabackup_binary
4.0K xtrabackup_binlog_pos_innodb
4.0K xtrabackup_checkpoints
2.0M xtrabackup_logfile

And this is the latest:

4.0K backup-my.cnf
59M ibdata1
1.1M mysql
212K performance_schema
260M radius
3.7M radmin
26M xbench
4.0K xtrabackup_binary
4.0K xtrabackup_checkpoints
7.3M xtrabackup_logfile

So the missing files are ib_logfile0, ib_logfile1 and xtrabackup_binlog_pos_innodb. By logfiles, which logs do you mean exactly?
So after preparing the backup i’ll have ib_logfiles? But what about xtrabackup_binlog_pos_innodb? In the history command I can’t find how the previous backup was created. It was over a year ago and there is no one working here from that period to ask them.

Percona has an easy to follow guide on taking, preparing, and restoring a full backup:

[url]Percona XtraBackup

The files you are missing will be created once you run the apply-log step to prepare the backup prior to restore.

I followed the guide, but it says nothing about these ib_logfiles or I’ve missed it. Anyway, I understood when and how they are created. Thank you for the help.

The guide is really just meant to show you how to create, prepare,and restore a backup with as little detail / complication as possible to get you going. If you are curious for more details, there is a ton of extra information in the Xtrabackup/Innobackupex documentation you could spend all day reading if interested. But that might put you to sleep at some point. :wink: