Schedule with XtraBackup ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Schedule with XtraBackup ?

    Hello Every one,

    I need to know if it is any way possible to run scheduled replication using XtraBackup ?

    I don't need to have a live replication, But would like to run it once a day at my convenience.

    Can this be achieved ?

    Thank you

  • #2
    Why not use live replication? It is possible using XtraBackup and either full or incremental backups ( see http://www.percona.com/doc/percona-x...p/how-tos.html ), but I think live replication is easier.


    • #3
      Hello 'gmouse'

      Thank you for your revert, highly appreciate it.

      My issue is, I need to run scheduled incremental backup on a remote server and there is NO documentation available for it.

      Can you please guide me towards that too, if available ?

      Thank you,


      • #4
        gmouse, On another note,

        Looking at these 2 links -

        http://www.percona.com/doc/percona-xtrabackup/howtos/recipes _xbk_full.html --> Full

        http://www.percona.com/doc/percona-xtrabackup/howtos/recipes _xbk_inc.html --> Incremental

        I don't see both the above links talk about "cron or automate" scheduled the backup's any where !!!

        Can you let me know if i am missing something ?

        Or how does it actually work

        NOTE :- i need to schedule an incremental backup at a specific time to a remote server.

        Can i achieve my goal ?

        Please clear my confusion

        Thank you once again.


        • #5
          Now you know how to create full or incremental backups. Using http://www.percona.com/doc/percona-xtrabackup/howtos/recipes _ibkx_stream.html you should also be able to stream the backups to a different server.

          For scheduling a backup you can use crontab. This should be easy with any crontab manual once you can create full or incremental backups.


          • #6
            Fantastic, The link to stream is very very important and very good too

            One small query, DO i need to First create the backup on the source server and then later stream it Or Can i use the stream command to create backups while streaming to the destination server.

            I think we can't, but i am just exploring my options

            Please clarify.

            Thank you all the way !!


            • #7
              The link shows how to stream directly, i.e. without storing it on the db server.


              • #8
                Thank you for the inputs

                One final query !!

                Can we set this modified to "mail us" after the incremental backup has been completed Or has Failed ?

                Thank you


                • #9

                  Can you please clarify this very "IMPORTANT DOUBT"

                  a) DO i need to take a local FULL backup first and then STREAM it on the remote server.


                  b) Can i directly "stream & compress" the mysql data to the remote server ? If yes, How ?

                  coz i have been following this link and have been unsuccessful in getting the backup on the remote server :-


                  I can get the full backup to WORK fine LOCALLY, But i am not able to stream it on the remote server

                  Please assist !!!


                  • #10

                    I am executing this command :-

                    innobackupex --stream=tar ./ | ssh user@desthost "cat - > /data/backups/backup.tar"

                    The session gets started, But all i see in the scrooling screen is this :-

                    >> log scanned up to (5824419944)>> log scanned up to (5824419944)>> log scanned up to (5824419944)>> log scanned up to (5824419944)>> log scanned up to (5824419944)>> log scanned up to (5824419944)

                    One very IMPORTANT update, The Login and Password for the remote server are stored in the source server my.cnf file


                    Could this be something to cause such problem ?

                    Please clarify my doubts

                    Thank you


                    • #11
                      Anybody, please assist !!

                      Thank you


                      • #12
                        How big is your database? If its 500+ GB you will see those lines scrolling for a long time. Thats ok. Run in screen and wait for it to finish, you should finally see the OK! message.


                        • #13
                          Hello stevetoldme,

                          Thank you for the turn around, I have managed to take care of this issue.

                          BTW, My DB is 3 GB in size

                          Thank you


                          • #14
                            Is there a way to specify a default file, but also specify a second hidden file for the password?


                            • #15
                              The instructions that i have read, do not specify any default file, The links i have mentioned above are for replicating the whole database from one server to another.