Comment 3 for bug 293515

Revision history for this message
Chip Williams (chipw) wrote :

After the crash that caused me to create duplicate bug #297012 I did another complete OS install, installed mysql, then bacula and things seemed to work. I logged an additional bug because when the install failed for me it locked up the whole OS. This was not something I had seen reported before.

I had started my efforts with bacula under Hardy, had the same problem and just decided to wait for Intrepid to see if it would make a difference.

I also have a Hardy server amd64 install which is where this will all end up some day. It acted different, which I attributed to the LAMP install having gone ahead and putting mysql in for other reasons. It installed correctly the first time but when I messed with it and broke it I could never get back to a point where I could install again and created the same problem here. In the end I had to do two things to get the install to work:
1) Delete enough files and mess up the package bad enough that bacula would get completely downloaded and run again from scratch.
2) Get rid of the bacula database from mysql. I'm guessing the bacula install doesn't like there to already be a database by that name.

My steps went something like shown below. If somebody really knows how to get the system back to a pre-bacula-install state without all this mess it would be good to know.
o sudo apt-get update
o sudo apt-get purge bacula {this will not succeed if it is screwed up. If it does succeed you are done}
o sudo apt-get autoremove {clean up some stuff}
o cd /var/lib/dpkg/info
o sudo rm bacula-director-mysql.prerm {get rid of the most likely offending script file}
o sudo apt-get purge bacula {may appear to succeed but likely leaves stuff}
o sudo apt-get autoremove {clean up some stuff}
o cd /etc/init.d
o sudo ./bacula-director stop {stop the director if it’s running}
o sudo ./bacula-sd stop {stop the storage daemon if it’s running}
o sudo ./bacula-fd stop {stop the file daemon if it’s running}
o sudo rm bacula* {gets rid of the daemons altogether}
o cd /etc
o sudo rm bacula –r {gets rid of the .conf and script files}
o cd /var/lib
o sudo rm bacula –r {gets rid of run states and logs}
o cd /var/run
o sudo rm bacula –r {gets rid of .pid files}
o cd /var/lib/dpkg/info
o sudo rm bacula* {gets rid of all the bacula related package script files. This is likely to make the package managers very unhappy}
o You should then go into synaptic. Find anything that still says it’s installed, mark it for complete removal and remove it. This will force the next attempt to download it all again (make sure you do a Synaptic refresh or apt-get update).
o You then get rid of the bacula database from mysql:
- mysqladmin –u root –p ping
- Provide the password when asked.
- This will respond with whether the mysql server is running or not.
- mysqladmin –u root –p drop bacula
- Provide the password when asked.
- This will drop the bacula database altogether.
- If the command mysqladmin is not found then likely mysql is not installed.

I then checked that the mysql server was still running:
mysqladmin -u root -p ping
Then did a bacula install:
sudo apt-get update
sudo apt-get install bacula

It's ugly but it finally got me there on the Hardy machine without having to re-install the whole system.