[mysql-zrm-users] ZRM For MySQL 4.0

Paddy Sreenivasan paddy at zmanda.com
Sat Nov 18 18:40:06 PST 2006


On 11/18/06, Mathieu Bruneau <rounoff at argontechnologies.ca> wrote:
> Hello!
>
>         I was actually in the process of writing a MySQL backup script in the
> last few weeks and before putting it into more heavy testing I found
> ZRM. Since I used almost the same approach as ZRM, I figured it was best
> to give it a try and see how it worked (Especially since there was more
> work put into it and has receive more "look at")
>
>         So, I actually think about using it for all out MySQL backup operation
> in a near future. But one of our server is actually still using MySQL
> 4.0! So I checked and figured it was simple enough to change it so it
> worked on this one also! :) The changes needed are small but could be
> worth a ton to people that still have a MySQL 4.0 running around and
> want to use a single way to backup everything!

We had tested ZRM for MySQL with MySQL 4.0.X versions. We found that
various 4.0.X had bugs in this area and did not work. So, we decided that we
will not be able to support 4.0.X reliable manner.

>
>         So see patch attached for my changes! Feel free to suggest modification
> if you know that it won't work on some 4.0 version (I tested on 4.0.24)
> :) I'll be happy to hear that the next version would include this patch
> (or not is there is good enough reason not too!)]

Thanks for the patch. We will test the patch with 4.0.X and
incorporate it the next
release (could happen in couple of days!).

If you find any bugs or have any feature request, please post them in bugzilla
(http://forums.zmanda.com/bugzilla)

Paddy
>
>
> PS: I checked the forum but felt like the mailing list would be actually
> a better place to post a patch, let me know if i'm wrong!
>
> --
> Math
> aka ROunofF
>
> ======
> argontechnologies.ca
>
>
>
> diff -hru zrm/usr/bin/mysql-zrm zrm-with40/usr/bin/mysql-zrm
> --- zrm/usr/bin/mysql-zrm       2006-11-02 12:45:54.000000000 -0500
> +++ zrm-with40/usr/bin/mysql-zrm        2006-11-18 15:33:59.000000000 -0500
> @@ -111,6 +111,8 @@
>  #Instead flush logs wil lbe called explicitly before data is backed up
>  my $MYSQLDUMP5="mysqldump --opt --extended-insert --single-transaction --default-character-set=utf8 --create-options";
>  my $MYSQLDUMP41="mysqldump --opt --extended-insert --single-transaction --default-character-set=utf8";
> +# Lock tables and single-transaction are not compatible in mysqldump 4.0
> +my $MYSQLDUMP40="mysqldump --opt --extended-insert --single-transaction --skip-lock-tables";
>  my $MYSQLHOTCOPY="mysqlhotcopy";
>
>  my @validParams=qw/user password host port verbose all-databases database databases tables backup-level backup-mode replication lvm-snapshot destination help source-directory start-position stop-position offset start-datetime stop-datetime  comment ssl-options mailto all-backups index till-lastfull backup-name quiet mysql-binpath bin-logs retention-policy socket parse-binlogs-plugin parse-binlogs-plugin-options pre-backup-plugin pre-backup-plugin-options post-backup-plugin post-backup-plugin-options compress compress-plugin encrypt encrypt-plugin decrypt-option html-report-directory html-reports webserver-url copy-plugin pre-scheduler mysql-binlog-path rss-header-location/;
> @@ -1053,11 +1055,17 @@
>         if( $mysql_version gt "4.1.8" ){
>                 $MYSQLDUMP=$MYSQLDUMP5;
>                 $MASTERDATA.="=2";
> -       }elsif( $mysql_version lt "4.1.2" ){
> +       }elsif( $mysql_version lt "4.1.2" && $mysql_version ge "4.1.0" ){
>                 # in these version we cannot use --create-option and
>                 # cannot specify a number to --master-data
>                 # instead of --create-options we need to use --all
>                 $MYSQLDUMP=$MYSQLDUMP41." --all";
> +       }elsif( $mysql_version lt "4.1.0"){
> +               # in these version we cannot use --create-option and
> +               # cannot specify a number to --master-data
> +               # instead of --create-options we need to use --all
> +               # We cannot put a default-character
> +               $MYSQLDUMP=$MYSQLDUMP40." --all";
>         }else{
>                 # if version is between 4.1.2 & 4.1.8 both inclusive
>                 # in these version we can use --create-option but
>
>
>
> _______________________________________________
> More information on ZRM for MySQL is available at http://http://www.zmanda.com/mysql-backup.html
> To Unsubscribe send a blank email to mysql-zrm-users-unsubscribe at zmanda.com
>
>
>


-- 

Amanda documentation: http://wiki.zmanda.com
Amanda forums: http://forums.zmanda.com



More information about the mysql-zrm-users mailing list