Details

    • New Feature
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 12.1
    • Backup
    • None

    Description

      The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

      Interface between client and server

      BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

      The ResultSet consists of following fields

      • VARCHAR(N) filename
      • INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
      • BIGINT offset
      • LONGBLOB data

      The client

      There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

      Interface between server and storage engines.

      Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's backup()_begin function. For every file chunk, storage engine calls server's backup_file(filename, flag, offset, length, data) function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

      There default implementation of backup_start() enumerates engines own files, reads them, and signals backup_file() for every chunk read. FLUSH TABLES FOR BACKUP, must be issued for that.

      Engines that support online backup, like Innodb would have much more complicated implementation.

      Incremental and partial backups

      Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

      Backup metadata.

      There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

      Restore

      Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,

      The directory that was made when full backup was stored should be usable for new database.

      files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
      There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.

      Attachments

        Issue Links

          Activity

            wlad Vladislav Vaintroub created issue -
            wlad Vladislav Vaintroub made changes -
            Field Original Value New Value
            Component/s Backup [ 13902 ]
            Fix Version/s 10.4 [ 22408 ]
            wlad Vladislav Vaintroub made changes -
            Description The purpose of this work is to improve current situation around backups by impolementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * BIGINT length
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            wlad Vladislav Vaintroub made changes -
            Description The purpose of this work is to improve current situation around backups by impolementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * BIGINT length
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * BIGINT length
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            wlad Vladislav Vaintroub made changes -
            Description The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * BIGINT length
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            wlad Vladislav Vaintroub made changes -
            Description The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            zhangyuan zhangyuan made changes -
            Attachment xtrabackup.png [ 45264 ]
            zhangyuan zhangyuan made changes -
            Attachment xtrabackup.png [ 45264 ]
            zhangyuan zhangyuan made changes -
            Attachment xtrabackup.png [ 45265 ]
            zhangyuan zhangyuan made changes -
            Attachment xtrabackup.png [ 45265 ]
            zhangyuan zhangyuan made changes -
            Attachment xtrabackup.png [ 45266 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            julien.fritsch Julien Fritsch made changes -
            Epic Link PT-75 [ 68556 ]
            julien.fritsch Julien Fritsch made changes -
            Epic Link PT-75 [ 68556 ] PT-77 [ 68558 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Rank Ranked higher
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Summary SQL command for BACKUP BACKUP: in-server backup
            ralf.gebhardt Ralf Gebhardt made changes -
            Epic Link PT-77 [ 68558 ] PT-92 [ 69417 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4 [ 22408 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            NRE Projects RM_long_term RM_platform RM_long_term RM_platform RM_105_CANDIDATE
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            vlad.lesin Vladislav Lesin made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 84950 ] MariaDB v4 [ 130766 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            markus makela markus makela made changes -
            markus makela markus makela made changes -
            toddstoffel Todd Stoffel (Inactive) made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            AirFocus AirFocus made changes -
            Description The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server
            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields
            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.
            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.
            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,
             
            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server

            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields

            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.

            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup\_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client\-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.

            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi\-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,

            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            julien.fritsch Julien Fritsch made changes -
            Description The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server

            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields

            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.

            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup\_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client\-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.

            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi\-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,

            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            The purpose of this work is to improve current situation around backups by implementing a SQL BACKUP command.

            h1. Interface between client and server

            BACKUP command sends the file segments to the client via MySQL's protocol ResultSet, i.e client issues BACKUP statement, server sends a result set back

            The ResultSet consists of following fields

            * VARCHAR(N) filename
            * INT(SET?) flags (OPEN,CLOSE, SPARSE, RENAME, DELETE, etc)
            * BIGINT offset
            * LONGBLOB data

            h2.The client
            There will be a simple client program which will issue "BACKUP" statement ,read the result set from server, and apply it to create a directory with a copy of the database. Due to abiliity to use client API (in C, .NET, Java, etc), it should be relatively easy to write specialized backup applications for special needs (e.g "streaming to clould", distributing to multiple machines)

            h1. Interface between server and storage engines.

            Most of the actual work is done by the storage engines, server initiates backup by calling storage engine's _backup()_begin_ function. For every file chunk, storage engine calls server's _backup_file(filename, flag, offset, length, data)_ function, that streams file chink as result set row to client. When backup is finished, engine calls `backup_end()` so that server would know when backup is finally done.

            There default implementation of _backup_start()_ enumerates engines own files, reads them, and signals _backup_file()_ for every chunk read. _FLUSH TABLES FOR BACKUP_, must be issued for that.

            Engines that support online backup, like Innodb would have much more complicated implementation.

            h1.Incremental and partial backups
            Incremental/differential (changes since specific backup) and partial backups( only some tables) will be supported as well, and the client\-server interface does not change much for that . For incremental backup, the client application might need to invent some "patch" format, or use some standard for binary diffs (rdiff? bsdiff? xdelta? ), and save diffs to be applied to "base backup" directory later.

            h1. Backup metadata.

            There is a need to store different kind of metadata in the backup, usually binlog position, and some kind of timestamp (LSN) for incremental backup. This information can be stored as session variable available after BACKUP command, or send as extra result set after the backup one (protocol does support multi\-result sets).

            h1. Restore

            Unlike the current solution with mariabackup or xtrabackup, there won't be any kinds of "prepare" or "restore" application,

            The directory that was made when full backup was stored should be usable for new database.

            files from partial backups could just be copied to destination (and maybe "IMPORT TABLESPACE", if we still support that).
             There should still be some kind of "patch" application for applying incremental backups to the base directory. Dependend on how our client stores incremental backup, we can do without it , and users would only need to use 3rd party bsdiff, rdiff,, mspatcha.
            marko Marko Mäkelä made changes -
            maxmether Max Mether made changes -
            Assignee Marko Mäkelä [ marko ]
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.3 [ 28565 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.2 [ 28603 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.3 [ 28565 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.3 [ 28565 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.2 [ 28603 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.3 [ 28565 ]
            marko Marko Mäkelä made changes -
            julien.fritsch Julien Fritsch made changes -
            Issue Type Task [ 3 ] New Feature [ 2 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.7 [ 29815 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Debarun Banerjee [ JIRAUSER54513 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.8 [ 29921 ]
            Fix Version/s 11.7 [ 29815 ]
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 11.9 [ 29945 ]
            Fix Version/s 11.8 [ 29921 ]
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 12.1 [ 29992 ]
            Fix Version/s 12.0 [ 29945 ]
            julien.fritsch Julien Fritsch made changes -
            Sprint Server 12.1 dev sprint [ 793 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            Sprint Server 12.1 dev sprint [ 793 ]
            serg Sergei Golubchik made changes -

            People

              debarun Debarun Banerjee
              wlad Vladislav Vaintroub
              Votes:
              16 Vote for this issue
              Watchers:
              36 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.