Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: how to convert existing files to mysql  (Read 5141 times)

0 Members and 1 Guest are viewing this topic.

nezsinu5

  • Anope User
  • Offline Offline
  • Posts: 2
how to convert existing files to mysql
« on: April 08, 2008, 06:58:16 AM »

hello. Just wanted to ask - how can i convert my existing anope files (channels, nicks etc.) from db files to mysql database without losing any data to start using sql anope version.
And 1 more question - is it recommended to use mysql rather than db files version without mysql? What is better for performance and safety.
Thanks for any reply.
Andrius.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #1 on: April 08, 2008, 11:27:04 AM »

To dump to sql, simply enable mysql in services.conf... there s no "converting to it.."
And by default anope doesn't read from sql unless you enable UseRDB.

As for performance, simply enabling mysql dump has a negative influence on anopes speed. how much it slows down depends on the size of you databases, on small nets you may not notice though..

using the .db's is not optional... anope will always export to the .db's, whether you read from them on startup can be controlled though the UseRDB setting
and keep in mind that nor the .db's not the sql database is being read from while anope runs, it are export only databases. the actual db anope uses is in its memory..
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

katsklaw

  • Guest
(No subject)
« Reply #2 on: April 08, 2008, 02:07:25 PM »

to be clear, even using UseRDB, Anope still does not read/write to sql. The UseRDB feature only loads from sql on start up. After that, there is no more reading from sql.
Logged

nezsinu5

  • Anope User
  • Offline Offline
  • Posts: 2
(No subject)
« Reply #3 on: April 08, 2008, 02:16:15 PM »

So there is no real need to use mysql.. As i understood, if for example. new user registers or registers his channel, it doesnt get saved to mysql database but stores in memory and in .db file and only when i restart anope service, then it copies those data to sql? The main idea - ithought using mysql would be better for for example server upgrade when i have to reinstall all the system. and one xtra question - when i upgrade to newer anope version, can i simply backup existing conf and db files , delete the existing directory and compile the newest version and put in that directory backedup .db and conf files and anope will work?
Logged

German

  • Anope User
  • Offline Offline
  • Posts: 7
    • www.ComunidadChat.net
(No subject)
« Reply #4 on: April 08, 2008, 04:11:48 PM »

If i'm not wrong, anopes first save date in .db files an then update mysqls database from .db files with some time of delay between .db's save and mysql update...

PD: I think that only for experience...
Logged

katsklaw

  • Guest
(No subject)
« Reply #5 on: April 08, 2008, 05:02:02 PM »

Anope dumps to sql at the same interval as it does to it's .db files, by default this is every 5 minutes but can be adjusted by changing UpdateTimeout in services.conf.

Anope's sql is useful for read-only access for a website but nothing much more.

As far as using older db's with newer Anope versions, Anope has not changed it's db structure since 1.6, so you can use older db's on newer or upgraded versions of Anope.
Logged
Pages: [1]   Go Up