How to get the ext3 filesystem UUID

March 3rd, 2009

If You need to know the UUID of an ext3 filesystem (say the one on /dev/hdd1 partition), just issue the command

vol_id -u /dev/hdd1

encoding LATIN1 does not match server’s locale

February 18th, 2009

If creating a postgres database on just upgraded Ubuntu box to the 8.10 release

postgres@somehost$ createdb -E latin1 dbname

You get the error

ERROR:  encoding LATIN1 does not match server’s locale es_ES.UTF-8
DETAIL:  The server’s LC_CTYPE setting requires encoding UTF8.

You have to follow some steps to create the database You need:

# /etc  init.d/postgresql stop
# mv /var/lib/postgresql/8.3/main /var/lib/postgresql/8.3/main.old
# mkdir /var/lib/postgresql/8.3/main
# chown postgres:postgres /var/lib/postgresql/8.3/main
# chmod 700 /var/lib/postgresql/8.3/main

Then as postgres user:

postgres@somehost $ /usr/lib/postgresql/8.3/bin/initdb -D /var/lib/postgresql/8.3/main –locale=es_ES.ISO88591 –encoding=Latin1 –lc-collate=Latin1

And finally as root:
# ln -s /etc/postgresql-common/root.crt root.crt
# ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem server.crt
# ln -s /etc/ssl/private/ssl-cert-snakeoil.key server.key
# /etc  init.d/postgresql start

thanks to Julio Cesar.

bacula setup

January 13th, 2009
How to fix Authorization Errors

How to fix Authorization Errors

I’ve just found very useful this diagram.

Now my bacula environment works fine without “Authorization Error”.