[Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-07 Thread Win Htin
 Message: 12
 Date: Sun, 06 Nov 2011 14:04:08 -0500
 From: Phil Stracchino ala...@metrocast.net
 Subject: Re: [Bacula-users] HELP : MySQL database lost - how best to
        restore data
 To: bacula-users@lists.sourceforge.net
 Message-ID: 4eb6da28.8010...@metrocast.net
 Content-Type: text/plain; charset=ISO-8859-1

 On 11/06/11 13:55, Win Htin wrote:
 Hi folks,

 If the bacula database is completely blown away but I still have the
 bootstrap file (*.bsr) what is the best method to re-install the
 bacula database? I think bscan is the way to go but am a bit
 confused with the explanations in the howto guide. The bare database
 has been re-created and I can get to the bconsole but of course
 commands like update or list will come back empty.

 Win,
 What were you doing for MySQL catalog backup?

I believe the catalog was backed up on a daily basis but both
partitions where the actual databases reside and the db dumps are kept
got blown away. Don't ask me how since I do not know the details
either.

 To make matters worse, the MySQL database is running on a none default
 port. Since bscan doesn't have an option to set the port number

 It doesn't...?

 Network backup, recovery and verification                BSCAN(8)

 NAME
      bscan - Bacula's 'Scan tape'

 ...
     -t port
          Specify database port (default: 0)

Perhaps version 5.0.2 is missing that option or I overlooked in my haste.

Thanks everyone. Need to get back to the bscan now.

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Win Htin
To make matters worse, the MySQL database is running on a none default
port. Since bscan doesn't have an option to set the port number I am
in a bit of a bind. Any ideas?

TIA,
Win

On Sun, Nov 6, 2011 at 1:55 PM, Win Htin win.h...@gmail.com wrote:
 Hi folks,

 If the bacula database is completely blown away but I still have the
 bootstrap file (*.bsr) what is the best method to re-install the
 bacula database? I think bscan is the way to go but am a bit
 confused with the explanations in the howto guide. The bare database
 has been re-created and I can get to the bconsole but of course
 commands like update or list will come back empty.

 Thanks in advance,
 Win

 --
 It is harder to conceal ignorance than to acquire knowledge. - Arnold H. 
 Glasow




-- 
email : win.h...@gmail.com
It is harder to conceal ignorance than to acquire knowledge. - Arnold H. Glasow

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Ben Walton
Excerpts from Win Htin's message of Sun Nov 06 15:50:13 -0500 2011:

 To make matters worse, the MySQL database is running on a none
 default port. Since bscan doesn't have an option to set the port
 number I am in a bit of a bind. Any ideas?

Make yourself a quick tunnel with ssh or use nc (netcat) to either
proxy a unix socket at the standard path to the non-standard port or
create the effect of a tunnel.

The ssh route is likely the easiest... Something like:
ssh -L 3306:$dbhost:$weirdport

Alter to taste.  Depending on circumstance, nc might be a good option
though.

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Konstantin Khomoutov
On Sun, 6 Nov 2011 15:50:13 -0500
Win Htin win.h...@gmail.com wrote:

 To make matters worse, the MySQL database is running on a none default
 port. Since bscan doesn't have an option to set the port number I am
 in a bit of a bind. Any ideas?
Try environment variables listed at
http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Win Htin
Hi folks,

Thanks for the various suggestions. I found setting the variables
export MYSQL_HOST=database_hostname
export MYSQL_TCP_PORT=port_number
export MYSQL_UNIX_PORT=port_number
before running the bscan command did the trick.
Now, have to see if my bscan will work.

Thanks,
Win

On Sun, Nov 6, 2011 at 4:13 PM, Konstantin Khomoutov
flatw...@users.sourceforge.net wrote:
 On Sun, 6 Nov 2011 15:50:13 -0500
 Win Htin win.h...@gmail.com wrote:

 To make matters worse, the MySQL database is running on a none default
 port. Since bscan doesn't have an option to set the port number I am
 in a bit of a bind. Any ideas?
 Try environment variables listed at
 http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html




-- 
email : win.h...@gmail.com
It is harder to conceal ignorance than to acquire knowledge. - Arnold H. Glasow

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Jérôme Blion
Le 06/11/2011 23:06, Win Htin a écrit :
 Hi folks,

 Thanks for the various suggestions. I found setting the variables
 export MYSQL_HOST=database_hostname
 export MYSQL_TCP_PORT=port_number
 export MYSQL_UNIX_PORT=port_number
 before running the bscan command did the trick.
 Now, have to see if my bscan will work.

 Thanks,
 Win

 On Sun, Nov 6, 2011 at 4:13 PM, Konstantin Khomoutov
 flatw...@users.sourceforge.net  wrote:
 On Sun, 6 Nov 2011 15:50:13 -0500
 Win Htinwin.h...@gmail.com  wrote:

 To make matters worse, the MySQL database is running on a none default
 port. Since bscan doesn't have an option to set the port number I am
 in a bit of a bind. Any ideas?
 Try environment variables listed at
 http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html

Hello,

By default, Bacula stores the catalog dump in /var/lib/bacula/
root@bckserver:/var/lib/bacula# ls -l /var/lib/bacula/bacula.sql
-rw--- 1 bacula bacula 1605037178  6 nov.  04:36 
/var/lib/bacula/bacula.sql

Perhaps it will be faster to recover from it ?

HTH.
Jerome Blion.

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Konstantin Khomoutov
On Sun, Nov 06, 2011 at 11:39:53PM +0100, Jérôme Blion wrote:

[...]
 By default, Bacula stores the catalog dump in /var/lib/bacula/
 root@bckserver:/var/lib/bacula# ls -l /var/lib/bacula/bacula.sql
 -rw--- 1 bacula bacula 1605037178  6 nov.  04:36 
 /var/lib/bacula/bacula.sql
Could you please elaborate on this?
From what I see in my bacula director config on a Debian box, database
dump is performed by a job explicitly specified in that config file and
requires explicit scheduling and all that stuff.
That is, what, when and how is specified by the administrator, catalog
backup included.


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] RE : HELP : MySQL database lost - how best to restore data

2011-11-06 Thread Phil Stracchino
On 11/06/11 15:50, Win Htin wrote:
 To make matters worse, the MySQL database is running on a none default
 port. Since bscan doesn't have an option to set the port number


It doesn't...?


Network backup, recovery and verificationBSCAN(8)

NAME
  bscan - Bacula's 'Scan tape'

...
 -t port
  Specify database port (default: 0)


-- 
  Phil Stracchino, CDK#2 DoD#299792458 ICBM: 43.5607, -71.355
  ala...@caerllewys.net   ala...@metrocast.net   p...@co.ordinate.org
  Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater
 It's not the years, it's the mileage.

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users