Results 1 to 8 of 8

Thread: using ZRM on slave database

  1. #1

    Default using ZRM on slave database

    Hi All,
    Since doing either logical or RAW backup using ZRM requires read lock on tables, can we use ZRM to take backup on slave database as there would be on users connected to db and not have any impact on the application.

    Also is there any drawback on using zrm on slave db, please let me know.

    To do a 500GB logical backup using ZRM how much time would it take.

    regards
    anandkl

  2. #2
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by ananda View Post
    Hi All,
    Since doing either logical or RAW backup using ZRM requires read lock on tables, can we use ZRM to take backup on slave database as there would be on users connected to db and not have any impact on the application.
    The fastest way is to use snapshots and in this case the read locks are taken only for a couple of seconds at the most. In all of the other cases, there will be some impact. The longest time the read locks are held will probably be for the logical backup.

    Quote Originally Posted by ananda View Post
    Also is there any drawback on using zrm on slave db, please let me know.
    No there are no drawbacks. Ensure that you set replication=1 in ZRM so that all of the replication related files are backed up.

    Quote Originally Posted by ananda View Post
    To do a 500GB logical backup using ZRM how much time would it take.
    There is a white paper dealing with performance in the Zmanda Network ([url]http://network.zmanda.com)[/url]. To access the white paper log in to, or register for free on, the Zmanda Network. The white paper can be found in the Documents -> white papers section.

    --kkg

  3. #3

    Default

    Thank you kkg for the answers.

    Also, is it possible that i take mysqldump of slave and restore this on a different machine and at regular intervals apply the bin-logs from slave on this new machine so that i can use this as alternate backup server in case some thing happens to my master/slave machine.

    For this can i use zmanda software.

    regards
    anandkl

  4. #4
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by ananda View Post
    Thank you kkg for the answers.

    Also, is it possible that i take mysqldump of slave and restore this on a different machine and at regular intervals apply the bin-logs from slave on this new machine so that i can use this as alternate backup server in case some thing happens to my master/slave machine.

    For this can i use zmanda software.

    regards
    anandkl
    Yes this will work fine. You might see if you can use the post backup plugin to apply the bin-logs from the backup to a different machine.

    --kkg

  5. #5

    Default

    can you please tell me what these "post-backup-plugin" are.

    regards
    anandkl

  6. #6
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by ananda View Post
    can you please tell me what these "post-backup-plugin" are.

    regards
    anandkl

    ZRM allows you to create your own post backup scripts and have ZRM invoke these at the end of backup.
    Please refer to [url]http://mysqlbackup.zmanda.com/index.php/Plugins[/url].

    --kkg

  7. #7
    Join Date
    Feb 2010
    Location
    www.sjobeck.com
    Posts
    3

    Lightbulb

    Quote Originally Posted by kkg View Post
    Yes this will work fine. You might see if you can use the post backup plugin to apply the bin-logs from the backup to a different machine.

    --kkg
    Just out of curiosity, why not just replicate the master to a second replica? I'm sure you have a valid reason for doing it the way you want to do it, like being afraid of the master becoming corrupt & then replicating corrupting to both of your replicas, or something like that, right. But if youre doing that once already, why not just do it again, then you can flip one of those guys in to master mode if the master disappears. We're doing master-master replication here & it seems OK, it could IMHO be far more resilient in mySQL though.

    It is a royal PITA to stop that, dump the one side, load it up again with fresh "master" data, then recreate the replication again, when something hiccups, but that's another topic in & of itself. I've wondered about doing this in postgresql ONLY for this reason, and if it is more resilient, then I'm tempted to move over there. But, again, a whole other topic.

    Back to this though, isnt it cumbersome & error prone & slow to manually recreate what the software does on its own (ie: many replicas)?

    I just wanted to think through this & maybe learn something while we're at it, is all.

    Cheers.

    Jason

  8. #8

    Default

    Jason,

    We recommend using replication and backing up replication slaves as opposed to masters whenever possible. The backups allow you to go back in time in the case that bad data is introduced and becomes replicated. If you enable "log-slave-updates" on your replication slave, then you have the ability using the ZRM to do both full and incremental backups off of a slave. This would be the ideal soution. I believe KK was simply continuing his answer within the thread. You are correct - replication would be better than using a post-backup plugin to apply bin-logs.

    -Jacob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •