On Sunday 07 February 2010 01:03:44 pm you wrote:
> "Scott Barninger" <[email protected]> kirjoitti viestissä
> news:[email protected]...
>
> > Hello,
> >
> > On Saturday 06 February 2010 05:30:31 am you wrote:
> >> FYI
> >>
> >> Kern
> >>
> >> ----------  Forwarded Message  ----------
> >>
> >> Subject: [Bacula-devel] Some issues on 5.0.0 srpm
> >> Date: Wednesday 03 February 2010
> >> From: "Timo Neuvonen" <[email protected]>
> >> To: [email protected]
> >>
> >> I built 5.0.0 binary rpms from the srpm on SF
> >> CentOS 5, 64-bit, mysql
> >>
> >> rpmbuild --rebuild \
> >> --define "build_centos5 1" \
> >> --define "build_mysql5 1" \
> >> --define "build_python 1" \
> >> --define "nobuild_gconsole 1" \
> >> bacula-5.0.0-1.src.rpm
> >>
> >> Then, I upgraded my 3.0.3 system:
> >> rpm -Uvh bacula-mysql-5.0.0-1.x86_64.rpm
> >>
> >>
> >> Some minor issues I noticed:
> >>
> >> - upgrade touched existing old conf files
> >>   (just updated timestamp, not a real problem but a little bit annoying)
> >>
> >> - upgrade did not upgrade the catalog 11-to-12 automatically
> >>   (previous releases used to do this)
> >
> > The script in the rpms assumes no password on your catalog database. If
> > you
> > have a password it will fail.
>
> I have no catalog password (this is a home system only in a secure
> network).
>
> My current (was the same before the 3.0.3-to-5.0.0 upgrade) working
> bacula-dir.conf has this entry:
>
> Catalog {
>   Name = MyCatalog
>   dbname = bacula; user = bacula; password = ""
> }
>

Hmm, this is the script that should have run during the upgrade for a 32 bit 
system:

#check, if mysql can be called successfully at all
if mysql 2>/dev/null bacula -e 'select * from Version;' ; then

# test for an existing database
# note: this ASSUMES no password has been set for bacula database
DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`

# grant privileges and create tables if they do not exist
if [ -z "$DB_VER" ]; then
    echo "Hmm, it doesn't look like you have an existing database."
    echo "Granting privileges for MySQL user bacula..."
    /usr/lib/bacula/grant_mysql_privileges
    echo "Creating MySQL bacula database..."
    /usr/lib/bacula/create_mysql_database
    echo "Creating bacula tables..."
    /usr/lib/bacula/make_mysql_tables

# check to see if we need to upgrade a 3.x database
elif [ "$DB_VER" -lt "11" ]; then
    echo "This release requires an upgrade to your bacula database."
    echo "Backing up your current database..."
    mysqldump -f --opt bacula | bzip2 > /var/lib/bacula/bacula_backup.sql.bz2
    echo "Upgrading bacula database ..."
    /usr/lib/bacula/update_mysql_tables
    echo "If bacula works correctly you can remove the backup 
file /var/lib/bacula/bacula_backup.sql.bz2"

fi
fi

Could you please run the following command on the rpm package that you built  
and let me know the results with particular attention to the location of the 
update_mysql_table script:

rpm -qp --scripts bacula-mysql-5.0.0-1...

> After I located the correct database update script
> /usr/lib64/bacula/update_bacula_tables
> and ran it manually without any modifications, the catalog got updated
> properly.
>
> So I think the upgrade process should have been able to update the catalog.
>
> --
> TiN



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to