Variables are used at the top of the script that are easily modifiable.

It backs up all databases without having to list the databases, so you don’t have to update the list with every new database.

It does compress using gzip the databases, so uses as little space as possible.

Here are some ideas for future enhancements to the script

The gzip compression level as a variable up top. The default gzip compression level is 6 and 9 could make the file significantly smaller with large databases, while 1 would be faster for machines with weaker processors.

Database to exclude from the backup. I like the idea to get them all by default, but sometimes you have a test database you just don’t care about and you don’t want a nightly backup of it.

I don’t see the password in the script, and I am not sure how it is authenticating without it, maybe a password feature needs to be added.

Choosing a Content Management System

Ok, so as today, August 26, 2010, my blog is hosted by WordPress.com. It will be this way for some time.

However, I am probably going to eventually have my own server hosted somewhere. Probably with my brother’s company, Fusion Networks.

So I will probable build a FreeBSD server that will host my site. At this point, I think I will stop using WordPress and use a different Content Management System.

Content Management Systems Lists

So I went into this having done reasearch before, so I knew what I was getting into. There are plenty of different Content Management Systems and unfortunately there is no way I could find time to test them all.

Ok, now that you have seen the very large list of Content Management Systems, you realize that I have to narrow my list down without really testing them all.

Narrowing down the list

First, let me document what I would like and see if which fit into the list. These are not in order of priority, and some are important and some are not.

I want it to

use PHP

have a large community

use a BSD License

use Postgresql (as it is BSD licensed and MySQL is not)

import my existing WordPress blog

have great feature sets

have common plugins

support multiple Blogs with one install

manages website as well as blog

manages multiple sites

have a descent editor

be well documenated

PHP-Based

They have their lists separated into tables by programming language. The PHP table has the most options and since I for sure want to use PHP, it is the only table I will focus on. These tables even lists the license.

Positives

http://rhyous.wordpress.com/wp-admin/post.php?post=2212&action=edit&message=1 There was a FreeBSD port.

The install was painless.

Negatives

Their web site didn’t seem very good, which is a big turn off for a company that is a CMS.

The links to their Forum on their web site and other pages were broken. I did find that the forum does exist, so the links are just broken.

I tried to sign up for the Forum to report the broken links. I registered, but was supposed to be sent a confirmation email, which I never received, even after re-requesting it, so I have never reported the broken links. They are still broken a day later. Also, there appear to only be a handful of people on their forums at any given time. Both suggest they have a small community.

I couldn’t figure out how to design my home page. It seemed the blog was my home page. I couldn’t figure out how to move my blog entries to a different page.

Result

If you want one blog and nothing else, this would work for you.

I need more. I stopped trying and have dropped Serendipity from the list.

Negatives

I almost feel like apologizing to Joomla. I had two BSD servers, one with FreeBSD, Apache, PHP, MySQL where I installed WordPress a year ago for testing. I have another brand new server with FreeBSD, Apache, PHP, and Postgresql where I tested all the postgresql capable CRMs. However, I installed Joomla to the wordpress server and it just didn’t work. The page was blank. I actually think there was a php error, not a Joomla error.

Unfortunately, Joomla doesn’t support postgresql, it isn’t BSD licensed. I did research and it appears like it would score high with WordPress, Drupal, and Silverstripe, but I can’t really see how it would be any better than Drupal, or Silverstripe so I really had to cut it loose. Lets be honest. As a BSD users, it was beaten out by Drupal and Silverstripe for the same reason I am looking to replace WordPress. It doesn’t support Postgresql.

Others

There are two other Content Management Systems that I feel are worth mentioning.

Django is also a CMS that is BSD licensed and supports Postgresql. However, it runs on Python, a language which I have occasionally touched but never really developed in. If you know Python, this might be the choice for you.

Bricolage is also a CMS that is BSD licensed and supports Postgresql. However, it runs on Perl, which I have written a few things with, but not as much as PHP. If you know Python, this might be the choice for you.

My Decision

I know, you all want to know which I chose to use.

Drumb roll please….

I have chosen…

But don’t expect my blog to move to Silverstripe tomorrow. It move slowly with things like this. It could take months or get delayed for a year.

Anyone who might choose a CMS differently would be completely happy with any of the others they evaluate and feel meets their needs. I am not saying I chose the best. I am saying I chose the best for my needs. Hopefully, you know your needs and this will help you choose the best Content Management System for your needs.

It is BSD Licensed instead of GPL, which is especially more attractive if you need to distribute the database software. In fact, if you are reselling a product, and paying a license fee to MySQL you probably should save your company the money and move to Postgresql. LANDesk, the company I work for, had just such an experience with our Management Gateway device.

Make any changes to the postgresql.conf

Common Changes

Enabled remote connections

If the database is to be accessed by the network, then you should at least uncomment the setting #listen_addresses = 'localhost' and change it to listen_addresses = '*'.

Changing the default TCP Port

Uncomment the setting #port = 5432 and change the port number to the desired value.

Configure password authentication

Change to the /usr/local/etc/pgsql/data directory.

Edit the pg_hba.conf and change the default authentication method to something more secure, such as md5.

# TYPE DATABASE USER CIDR-ADDRESS METHOD# &quot;local&quot; is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

Configure the postgresql server service to start on reboot

Add the string postgresql_enable="YES" to /etc/rc.conf.

#

echo ‘postgresql_enable=”YES”‘ >> /etc/rc.conf

Creating a Database

To create a database, su to pgsql and run createdb.

# $

su pgsql createdb MyDBName

Note: Similarly, use dropdb to drop a database.

Creating a User or Role

To create a user, su to pgsql and run createuser.

# $

su pgsql createuser -P

Enter name of role to add: MyUserOrRoleName Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) y

If you are not using password authentication, then you can exclude the -P.

Using psql client

A simple way to connect to postgresql is using the shell-based client, psql.

Connecting

To connect, use the following command.

$

psql MyDBName

MyDBName-#

You are now at the psql prompt.

Connecting as a different user

To connect, use the following command.

$

psql MyDBName MyUserOrRoleName

MyDBName-#

You are now at the psql prompt.

Changing a a User or Role Password

To change a password, use the following syntax.

MyDBName-# alter role pgsql with password ‘pw’;

Show Databases

To show database, simply type \l, (which is the lowercase letter L not the number 1) which is short hand in psql for this query:SELECT datname FROM pg_database;

MyDBName-#

\l

Show Tables

To show tables in the current database, simply type \d, which is short hand in psql for this query:SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

MyDBName-#

\d

Show Tables

To show columns of a table in the current database, simply type \d table, which is short hand in psql for this query:SELECT column_name FROM information_schema.columns WHERE table_name ='table';

Inserting data into a Table

Ok, from here you should be able to start figuring everything out on your own.

Resources: http://www.postgresql.org/docs/8.4/interactive/index.html

Copyright ® Rhyous.com – Linking to this page is allowed without permission and as many as ten lines of this page can be used along with this link. Any other use of this page is allowed only by permission of Rhyous.com.

My other blogs

Entries (RSS) and Comments (RSS). Copyright ® Rhyous.com Linking to content on this site is allowed without permission and as many as ten lines of any article can be used along with such link. Any other use of the content is allowed only by permission of Rhyous.com.