Hello everybody, I've a full working freeradius server on an Ubuntu server. My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility? I've looked in the config but I've not found anything useful. Basically, this would be something different from a simple MySQL Database backup as I'll have to keep info about the total AcctSessionTime of every user. Thanks! -- sub
I've a full working freeradius server on an Ubuntu server.
My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility?
No. CREATE TABLE radacct_old LIKE radacct. Copy entries older than x months (INSERT INTO radacct_old SELECT * FROM radacct WHERE ...) and delete them from radacct (DELETE FROM radacct WHERE ...) once a month. Ivan Kalik Kalik Informatika ISP
On Wed, May 13, 2009 at 14:12, Ivan Kalik <tnt@kalik.net> wrote:
I've a full working freeradius server on an Ubuntu server.
My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility?
No. CREATE TABLE radacct_old LIKE radacct. Copy entries older than x months (INSERT INTO radacct_old SELECT * FROM radacct WHERE ...) and delete them from radacct (DELETE FROM radacct WHERE ...) once a month.
Ok, thanks Ivan. I'll do it. -- sub
Hi. I wrote a perl script which make all this operations. If u wish I'll send it to u by mail. But there is Russians comments on this script:) -----Original Message----- From: freeradius-users-bounces+avkosykh=gmail.com@lists.freeradius.org [mailto:freeradius-users-bounces+avkosykh=gmail.com@lists.freeradius.org] On Behalf Of sub Sent: Wednesday, May 13, 2009 5:25 PM To: FreeRadius users mailing list Subject: Re: MySQL radacct backup On Wed, May 13, 2009 at 14:12, Ivan Kalik <tnt@kalik.net> wrote:
I've a full working freeradius server on an Ubuntu server.
My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility?
No. CREATE TABLE radacct_old LIKE radacct. Copy entries older than x months (INSERT INTO radacct_old SELECT * FROM radacct WHERE ...) and delete them from radacct (DELETE FROM radacct WHERE ...) once a month.
Ok, thanks Ivan. I'll do it. -- sub - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I've a full working freeradius server on an Ubuntu server.
My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility?
No. CREATE TABLE radacct_old LIKE radacct. Copy entries older than x months (INSERT INTO radacct_old SELECT * FROM radacct WHERE ...) and delete them from radacct (DELETE FROM radacct WHERE ...) once a month.
Ivan Kalik Kalik Informatika ISP
You may also create your table with the archive engine to save space: 1:4 if my memory is correct. The downside is there's no index so it takes more time to query your table, but that's for occasional use I suppose David Roze ---- http://www.netexpertise.eu
Ivan Kalik wrote:
I've a full working freeradius server on an Ubuntu server.
My accounting table grows and grows so I'd like to backup my data in any way; before I write my own procedure, does the server (freeradius) provide any utility? No. CREATE TABLE radacct_old LIKE radacct. Copy entries older than x months (INSERT INTO radacct_old SELECT * FROM radacct WHERE ...) and delete them from radacct (DELETE FROM radacct WHERE ...) once a month.
May be better to modify queries to use tables with names like radacct-%YYYY-%m (and precreate them)? -- With best regards, Evgeniy Kozhuhovskiy Leader, Services team Minsk State Phone Network, RUE Beltelecom.
participants (5)
-
Alexander Kosykh -
David -
Evgeniy Kozhuhovskiy -
Ivan Kalik -
sub