Announcement

Announcement Module
Collapse
No announcement yet.

Does Percona XtraBackup lock the database during the backup?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Percona XtraBackup lock the database during the backup?

    The Percona XtraBackup Documentation, Release 2.0.6 states:

    Percona XtraBackup is a hot backup utility that does not lock your database during the backup.

    However the documentation also states that it will execute "FLUSH TABLES WITH READ LOCK." That certainly will lock the database.

    Arent these statements contradictory? I need to know if Percona XtraBackup will lock tables during backup? If yes, then I wouldnt be able to use this in production.

    Our database consists only of InnoDB tables.

  • #2
    Originally posted by davidjhp View Post
    The Percona XtraBackup Documentation, Release 2.0.6 states: Percona XtraBackup is a hot backup utility that does not lock your database during the backup. However the documentation also states that it will execute "FLUSH TABLES WITH READ LOCK." That certainly will lock the database. Arent these statements contradictory? I need to know if Percona XtraBackup will lock tables during backup? If yes, then I wouldnt be able to use this in production. Our database consists only of InnoDB tables.
    David,

    FTWRL is only needed to copy other files like *.FRM or MYI/MYD files if you have MyISAM. Because you cannot take a consistent snapshot of tables other than InnoDB without FTWRL this is often necessary.

    On the other hand, if you are absolutely sure of 2 things 1) No DDL occurs on the tables being backed up at the time 2) You only have InnoDB tables aside from the mysql schema, and if you do have MyISAM (nothing will ever write to it during backup), you can use the --no-lock option with innobackupex to avoid the FTWRL.

    So these are not necessarily contradicting statements
    Our documentation has a lot of answers about common questions on Percona software, have you checked there before posting that question here? http://www.percona.com/forums/core/i...lies/smile.png

    Join us at the annual Percona Live MySQL Users Conference - http://www.percona.com/live/mysql-conference-2014/

    Comment


    • #3
      Originally posted by revin View Post
      1) No DDL occurs on the tables being backed up at the time 2) You only have InnoDB tables aside from the mysql schema, and if you do have MyISAM (nothing will ever write to it during backup)
      ​When do these restrictions apply? During the whole backup process or just the time when the non-innodb tables are being copied?

      Comment


      • #4
        This applies for .frm files and for non-innodb tables.

        Comment

        Working...
        X