On Fri 13 Jul 2007, Peter Nixon wrote:
On Fri 13 Jul 2007, Nico Schottelius wrote:
Peter Nixon [Fri, Jul 13, 2007 at 12:57:32PM +0300]:
On Fri 13 Jul 2007, Nico Schottelius wrote:
Hello!
I tried to move our current freeradius 0.9.3 with mysql to a new machine running either 1.1.3 or 1.1.6 with postgresql.
Converting the data was no big deal.
But then I recognized that the sql.conf has wrong quoting for postgresql (was mysql specific). Corrected that.
Thats because you are supposed to use postgresql.conf with postgresql.
Also thought that, but when I installed it from ports (FreeBSD 6.2) I get this:
[root@ddba017 /usr/local/etc/raddb]# ls acct_users hints radiusd.conf.working certs huntgroups samples clients.conf old snmp.conf dictionary preproxy_users sql.conf eap.conf proxy.conf users example.pl radiusd.conf
So, perhaps the port is broken.
Yep
I attached pg_dump -s -U pgsql radius from the new server that imported the old schema.
Can you also post the error messages for the queries that are failing.
The schema has changed quite a bit since those days, AND you have converted from MySQL so almost your entire schema is currently non-default. We should only have to change a couple of columns to make it "work" however. The other changes are either performance changes, or fixes for new usage types. (For example the UserName field changed from VARCHAR(64) to VARCHAR(253) in order to fit the crazily long usernames that SIP and IPv6 gateways produce, which wont affect you unless you are doing SIP or IPv6 accounting)
Just a quick tip to get you started as I have to head out and may not have a chance to reply until tomorrow: ALTER TABLE radacct ALTER acctinputoctets TYPE bigint; and ALTER TABLE radacct ADD XAscendSessionSvrKey VARCHAR(10); Just go though your schema line by line and compare with the one in doc/examples/postgresql.sql running either one of those 2 commands (with the correct datatype and column name) until your schema looks like the default one. You should not lose any data in the process, but its a good idea to have a backup of you table in any case. Regards -- Peter Nixon http://peternixon.net/