NEWS:

Getting Bacula running on my MacBook

April 2nd, 2011

I recently acquired a MacBook Pro. Things are going well. I’m using Time Capsule, but I also want to use Bacula. I went with MacPorts:

sudo port install bacula +client_only

The install looked something like this:

[dan@dent:~] $ sudo port uninstall bacula
--->  Deactivating bacula @5.0.3_2+client_only
--->  Cleaning bacula
--->  Uninstalling bacula @5.0.3_2+client_only
--->  Cleaning bacula
[dan@dent:~] $ sudo port install bacula +client_only
--->  Computing dependencies for bacula
--->  Fetching bacula
--->  Verifying checksum(s) for bacula
--->  Extracting bacula
--->  Applying patches to bacula
--->  Configuring bacula
--->  Building bacula
--->  Staging bacula into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting bacula with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load bacula
###########################################################
--->  Installing bacula @5.0.3_2+client_only
--->  Activating bacula @5.0.3_2+client_only
--->  Cleaning bacula
[dan@dent:~] $

So… I ran the command mentioned above:

sudo port load bacula

And I could see something running:

[dan@dent:~] $ ps auwx | grep bacula
dan      70072   0.0  0.0  2435120    508 s003  R+    8:06PM   0:00.00 grep bacula
root     70067   0.0  0.0  2454604   1076   ??  Ss    8:05PM   0:00.00 /opt/local/bin/daemondo
--label=bacula --start-cmd /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper start ;
--stop-cmd /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper stop ; --restart-cmd
/opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper restart ; --pid=none
[dan@dent:~] $

But this didn’t make sense… I could not connect via status client. After several attempts via:

sudo launchctl stop org.macports.bacula

I decided to unload things and try running the startup command manually:

sudo launchctl unload /Library/LaunchDaemons/org.macports.bacula.plist

And running the manual startup:

[dan@dent:~] $ sudo /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper start
02-Apr 20:40 dent-fd: ERROR TERMINATION at util.c:867
Working Directory: "/var/db/bacula" not found. Cannot continue.

Ahh, easily fixed:

[dan@dent:~] $ sudo mkdir /var/db/bacula

And starting it again:

[dan@dent:~] $ sudo /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper start
[dan@dent:~] $ ps auwx | grep bacula
dan      70364   0.0  0.0  2435120    556 s003  R+    8:40PM   0:00.00 grep bacula
root     70362   0.0  0.0  2444520    456   ??  Ss    8:40PM   0:00.00 /opt/local/sbin/bacula-fd -c /opt/local/etc/bacula/bacula-fd.conf

Ahh, good, it is running. And, I can connect:

*status client=dent-fd
Connecting to Client dent-fd at dent.example.org:9102

dent-fd Version: 5.0.3 (04 August 2010)  i386-apple-darwin10.7.3 osx 10.7.3
Daemon started 02-Apr-11 20:40. Jobs: run=0 running=0.
 Heap: heap=0 smbytes=12,747 max_bytes=12,894 bufs=45 max_bufs=46
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0

Running Jobs:
Director connected at: 02-Apr-11 20:40
No Jobs running.
====

Terminated Jobs:
====
*

I found I could not stop bacula:

sudo /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper stop

So I started looking at /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper and found a problem with this line:

PID=/opt/local/var/run/bacula-fd.*.pid

Which I changed to this:

PID=/var/run/bacula-fd.9102.pid

Then I could start and stop bacula-fd at will using /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper

Next, let’s load that up into launchctl:

sudo launchctl load /Library/LaunchDaemons/org.macports.bacula.plist

And verify that bacula-fd is running:

[dan@dent:~] $ ps auwx | grep bacula
root     70443   0.0  0.0  2445888   1056   ??  Ss    9:01PM   0:00.00 /opt/local/bin/daemondo
--label=bacula --start-cmd /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper start ;
--stop-cmd /opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper stop ; --restart-cmd
/opt/local/etc/LaunchDaemons/org.macports.bacula/bacula.wrapper restart ; --pid=none
dan      70452   0.0  0.0  2435120    560 s003  R+    9:01PM   0:00.00 grep bacula
root     70447   0.0  0.0  2467268    632   ??  Ss    9:01PM   0:00.00 /opt/local/sbin/bacula-fd -c /opt/local/etc/bacula/bacula-fd.conf
[dan@dent:~] $

Now it's running... We'll see if it's running after I reboot the laptop...

Speakers and travel

March 14th, 2011

The following query pulls back the speakers and their travel:

SELECT distinct S.name, S.email, CP.conference_person_id, arrival_from,
                arrival_to, arrival_number, arrival_date, arrival_time,
                departure_from, departure_to, departure_number, departure_date, departure_time
  FROM event E, view_event_person P, view_mail_all_speaker S,
       conference_person CP, conference_person_travel CPT
 WHERE E.event_id = P.event_id
   AND P.person_id = S.person_id
   AND E.conference_id = 7
   AND CP.conference_id = E.conference_id
   AND E.event_state = 'accepted'
   AND E.event_state_progress NOT IN ('rejected', 'canceled')
   AND P.event_role_name = 'Speaker'
   AND S.person_id = CP.person_id
   AND CPT.conference_person_id = CP.conference_person_id
  ORDER BY 1;

PGCon - keynote… made your travel bookings yet?

March 14th, 2011

Although PGCon 2011 is just 9 weeks away, that time will fly past. People will start gathering in Ottawa early in the week for the two days of tutorials followed by two days of talks. PGCon is also a social event, so there will be many opportunities to mingle and meet other members of your PostgreSQL community.

We’ve already started booking the travel and accommodation for some of our speakers. From its initial conference in 2007, PGCon has always worked to bring together various facets of the PostgreSQL community: users & developers gather together with members from the core team and other major contributors.

This year, the keynote will be given by Paul Ramsey. If you’re doing anything with GIS, you’ll know Paul.

Be sure to start booking your travel and accommodation soon. And register for PGCon today.

PGCon 2011 - registration now open

March 9th, 2011

Registration for PGCon 2011 has opened. The list of talks is impressive. You’ll find something there for everyone. Again this year, as every year, we bring together developers and users from all over the world to meet and to learn from each other. PGCon has a consistent history of providing high quality for low cost. You’ll be sure to come away with amazing ideas for your projects. You will meet people you don’t get to meet anywhere else and form working relationships that will benefit everyone. And all the while, having more fun than you thought possible. Start making your travel and accommodation plans today.

SSD

March 9th, 2011

This looks interesting for an SSD. A co-worker was saying: SandForce is the way to go.

PGCon 2011 - schedule released

March 6th, 2011

The list of talks and speakers for PGCon 2011 has been released. For 2011, we once again have a strong collection of talks that will appeal to a wide range of attendees. Registration will open later this week. Be sure to start making your travel plans.

Of particular note is the excitement within the GIS community regarding the Using PostgreSQL for Flight Planning talk by Blake Crosby.

We also have a Facebook and Twitter pages. Please help us to spread the word.

Pentabarf hyperlinks

March 6th, 2011

Links within events in Pentabarf are done like this:

[text](http://example.org/)

Pentabarf - exporting the schedule

February 28th, 2011

When exporting a Pentabarf schedule, your talks must be accepted and reconfirmed in order to appear on in the schedule. Not just accepted.

In this article, we assume your conference id = 7. Adjust to suit your situation.

This query gives you a list of the accepted talks:

SELECT event_id FROM event WHERE conference_id = 7 AND event_state = 'accepted';

This query refines the data so you get the accepted talks which will not appear in the schedule:

SELECT event_id, event_state_progress
FROM event
WHERE conference_id = 7
AND event_state = 'accepted'
AND event_state_progress in ( 'confirmed', 'unconfirmed');

Using the above as a basis for starting, we can update these events so they appear in the schedule by issuing this command:

BEGIN;
UPDATE event
   SET event_state_progress = 'reconfirmed'
 WHERE event_id IN
           (SELECT event_id FROM event
             WHERE conference_id = 7
               AND event_state = 'accepted'
               AND event_state_progress in ( 'confirmed', 'unconfirmed')
           );

You’ll need a commit or rollback after that.

And before exporting, you’ll need to create another release.

These are the emails for the accepted speakers:

SELECT DISTINCT S.email
  FROM event E, view_event_person P, view_mail_all_speaker S
 WHERE E.event_id = P.event_id
   AND P.person_id = S.person_id
   AND E.conference_id = 7
   AND E.event_state = 'accepted'
   AND E.event_state_progress NOT IN ('rejected', 'canceled')
  ORDER BY 1;

These are the non-accepted speakers:

SELECT DISTINCT S.email FROM event E, view_event_person P, view_mail_all_speaker S
 WHERE E.event_id = P.event_id
   AND P.person_id = S.person_id
   AND E.conference_id = 7
   AND S.email NOT IN
(SELECT S.email FROM event E, view_event_person P, view_mail_all_speaker S
  WHERE E.event_id = P.event_id
    AND P.person_id = S.person_id
    AND E.conference_id = 7
    AND E.event_state = 'accepted'
    AND E.event_state_progress NOT IN ('rejected', 'canceled')
)
  ORDER BY 1;

NOTE TO SELF

February 26th, 2011

Name based virtual hosts are quite possible with SSL if you use SNI.

A fairly recent version of OpenSSL is required for that, >= 0.9.8.

PGCon 2011 - schedule delayed

February 21st, 2011

On Saturday, I tweeted that the schedule for PGCon 2011 would be released. I was wrong. We are having a hard time choosing from amongst all the talks we have received. Choice is a fine problem to have, but we apologize for the delay.

All submitters have been emailed about this delay. The Call For Papers timetable has this past Saturday as the deadline for us to notify the submitters. We apoligized to them and said that the program committee is now aiming to have something ready by Friday. Rest assured that we will have an outstanding line-up, great value, and that you will have a blast at PGCon.

Stay tuned. Or join the PGCon Announcement mailing list to be the first to hear.