David,

----- Original Message ----- 
From: ""David Griffiths"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Thursday, May 13, 2004 7:50 AM
Subject: InnodB Hot Backup Questions


> I'm hoping someone on the list has some experience with the tool
> (specifically, restoring a backup), as I'm stumped.
>
> First, "--apply-log" seems to only work on the host that ibbackup is
> lode-locked to. This doesn't make sense. Running the tool dumpes out some
> text, and part of that text is,
>
> "(--restore works in any computer regardless of the hostname)"
>
> The manual says,
>
> "Therefore, the option --apply-log was added as a synonym for --restore in
> the version 1.40 of ibbackup, and the option name --restore will become
> deprecated."
>
> So "restore" == "apply-log", but one works on any computer, and the other
> only works on the computer that it's node locked to.

--apply-log works also in any computer regardless of the hostname or the
license expiration date.

> Am I missing something obvious? And what happens after version 1.4? No one
> is able to apply the binary log file if they need to test the backup on a
> different server?
>
> Second, the manual has a bunch of inconsistencies w/regards to the
"my.cnf"
> file you are supposed to use to apply the log.
>
> Section 3 says,
>
> We run ibbackup to roll forward the data files so that they correspond to
> the same log sequence number:
>
> $ ibbackup --apply-log /home/pekka/.backup-my.cnf
>
> Note the usage of the backup-my.cnf file; this is the file that ibbackup
> uses to figure out how to actually perform the backup, as opposed to the
> my.cnf file that is used to actually configure the MySQL server.
>
> but Section 5.3 says,
>
> "innobackup --apply-log /home/pekka/.my.cnf
> /home/pekka/script/backups/2004-02-03_13-27-09"
>
> Notice that the my.cnf file appears to be the normal config file for
mysqld
> (farther down the page, you find out that the file is infact a copy of the
> my.cnf file). There is the backup-my.cnf file in the directory with the
data
> files, and it's not used. The above line uses the PERL interface, and thus
> the ibbackup->innobackup.

Section 5.3 is about a the innobackup Perl script. It has different usage
than the ibbackup binary.

> Which .cnf file is supposed to be used? The Server config file (my.cnf) or

In fact, the my.cnf file parameter in the innobackup Perl script is not used
at all! I have asked Pekka to remove the extra parameter, because it
confuses users.

> the ibbackup config file (you can name it whatever you want)? Note that
both
> seem to do exactly the same thing; I guess the issue here is more clarity
> than anything else.
>
>
> Finally,
>
> When I run --restore (apply-log doesn't work, remember?) I get,
>
> 040512 21:38:12  ibbackup: ibbackup_logfile's creation parameters:
> ibbackup: start lsn 5 1804179456, end lsn 5 1804179476,
> ibbackup: start checkpoint 5 1804179476
> ibbackup: Error: backed up log file segment has a wrong magic n:o
542632761.
> ibbackup: Run 'ibbackup --help' for help.

#define BACK_UP_LOG_END_MAGIC_N                 98435789

/* The log end is new format if we store info of possible --include regexp
option when the backup was taken */
#define BACK_UP_LOG_END_NEW_FORMAT_MAGIC_N      542632761

Looks like you have taken the backup with ibbackup-2.0, but are trying to
run --apply-log with ibbackup-1.40. You should use the same or later
ibbackup version to run --apply-log. Maybe you have forgotten to replace
your old ibbackup-1.40 binary with the new ibbackup-2.0 binary, and the
innobackup script is using the old binary?

> There is no troubleshooting section in the manual to explain the error,
and
> ibbackup --help - it's focus is on the backup, not the restore. Googling
on
> the message returns no pages.
>
>
> Unfort, support for the tool costs much more than the tool itself, and is
> basically 10 emails a year.

Support costs 590 euros per year, the tool 390 euros per year.

> Can anyone provide some insight? The whole apply-log thing is confusing -
> should it be done immediately after a backup?

That is safer. It can reveal corruption.

> Or is it only done if you need
> to use the backup?

--apply-log is needed to use the backup. But I recommend doing it
immediately after you have taken the backup.

In short, the logic is this:

1. Take a backup.
2. Run --apply-log to make the backup a 'consistent snapshot'.
3. Use the backup.

> Thx,
> David

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php

Order MySQL technical support from https://order.mysql.com/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to