Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8713

Add continuous binary log backup to mysqlbinlog

    Details

    • Type: Task
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Fix Version/s: 10.2, 10.1
    • Component/s: Scripts & Clients
    • Labels:
      None

      Description

      This is a request to add continuous binary log backup to mysqlbinlog, such as exists in the MySQL mysqlbinlog as of 5.6.

      "As of MySQL 5.6, mysqlbinlog can read binary log files and write new files containing the same content—that is, in binary format rather than text format. This capability enables you to easily back up a binary log in its original format. mysqlbinlog can make a static backup, backing up a set of log files and stopping when the end of the last file is reached. It can also make a continuous (“live”) backup, staying connected to the server when it reaches the end of the last log file and continuing to copy new events as they are generated. In continuous-backup operation, mysqlbinlog runs until the connection ends (for example, when the server exits) or mysqlbinlog is forcibly terminated. When the connection ends, mysqlbinlog does not wait and retry the connection, unlike a slave replication server. To continue a live backup after the server has been restarted, you must also restart mysqlbinlog."

      https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html

      This also requires the addition of 2 new mysqlbinlog options:

      --stop-never
      --stop-never-slave-server-id=id

      https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html#option_mysqlbinlog_stop-never
      https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html#option_mysqlbinlog_stop-never-slave-server-id

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              We already have a similar request, MDEV-8473. But that entry describes two separate issues – a feature request for new options from 5.6, and an upstream bug https://bugs.mysql.com/bug.php?id=65812. So, I am going to convert this one, MDEV-8713, to a feature request, while MDEV-8473 will remain a bug report.

              Show
              elenst Elena Stepanova added a comment - We already have a similar request, MDEV-8473 . But that entry describes two separate issues – a feature request for new options from 5.6, and an upstream bug https://bugs.mysql.com/bug.php?id=65812 . So, I am going to convert this one, MDEV-8713 , to a feature request, while MDEV-8473 will remain a bug report.
              Hide
              elenst Elena Stepanova added a comment -

              Please note that MDEV-8473 also requested --raw option.

              Show
              elenst Elena Stepanova added a comment - Please note that MDEV-8473 also requested --raw option.
              Hide
              elenst Elena Stepanova added a comment -

              I've added 10.1 to the list of 'Fix version(s)' just in case it can somehow be added there, although I highly doubt that, please don't see it as a promise.

              Show
              elenst Elena Stepanova added a comment - I've added 10.1 to the list of 'Fix version(s)' just in case it can somehow be added there, although I highly doubt that, please don't see it as a promise.
              Hide
              ccalender Chris Calender added a comment -

              Yes, thank you, the --raw option should also be included with this.

              --raw

              "By default, mysqlbinlog reads binary log files and writes events in text format. The --raw option tells mysqlbinlog to write them in their original binary format. Its use requires that --read-from-remote-server also be used because the files are requested from a server. mysqlbinlog writes one output file for each file read from the server. The --raw option can be used to make a backup of a server's binary log. With the --stop-never option, the backup is “live” because mysqlbinlog stays connected to the server. By default, output files are written in the current directory with the same names as the original log files. Output file names can be modified using the --result-file option. For more information, see Section 4.6.8.3, 'Using mysqlbinlog to Back Up Binary Log Files'. This option was added in MySQL 5.6.0."

              https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html#option_mysqlbinlog_raw

              Show
              ccalender Chris Calender added a comment - Yes, thank you, the --raw option should also be included with this. --raw "By default, mysqlbinlog reads binary log files and writes events in text format. The --raw option tells mysqlbinlog to write them in their original binary format. Its use requires that --read-from-remote-server also be used because the files are requested from a server. mysqlbinlog writes one output file for each file read from the server. The --raw option can be used to make a backup of a server's binary log. With the --stop-never option, the backup is “live” because mysqlbinlog stays connected to the server. By default, output files are written in the current directory with the same names as the original log files. Output file names can be modified using the --result-file option. For more information, see Section 4.6.8.3, 'Using mysqlbinlog to Back Up Binary Log Files'. This option was added in MySQL 5.6.0." https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html#option_mysqlbinlog_raw

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ccalender Chris Calender
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: