#!/usr/bin/perl


=head1 NAME

mysql-backup

=head1 SYNOPSIS

  shell% mysql-backup </path/to/dba-backup.yml>

=cut


use strict;
use warnings;

use MySQL::Backup;
use Getopt::Long;

my %opts = ();
my $result = GetOptions(\%opts,'v+',"d:s",'help|h','logfile=s',
	'add_databases=s','backup');

$opts{CONF_FILE} = shift || '/etc/mysql-backup.conf';

our $VERSION = '0.8';

# prevent this script from granting any privilege to all (other users)
umask(0117); 

my $backup   = new MySQL::Backup(\%opts);

$backup->run();
$backup->log_messages();
$backup->send_email_notification();

exit;

