Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Services clearing MySQL-Database  (Read 7653 times)

0 Members and 1 Guest are viewing this topic.

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
Services clearing MySQL-Database
« on: October 04, 2007, 08:07:59 PM »

Hi I'm using the MySQL-Feature of the Anopes. And we synchronize the Anope database with an own database for our website, where users can store information in their user profile and so on. But sometimes Anope delete nearly all user-accounts and add them from new to their MySQL-Database. If our sync-script runs directly into this time when Anope deleted many users, our database gets also cleared of many users, in the first time this happened we lost all data and had to take a 14 days old backup, because we only make a daily backup of the databases. The next time we recognized the mal function earlier so we could roll back the daily backup.
Now my question:
Why do the Anopes delete sometimes all or nearly all users from their MySQL-User-Table and is their a way, how we can fix this?
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

katsklaw

  • Guest
(No subject)
« Reply #1 on: October 04, 2007, 08:40:54 PM »

The mysql on Anope at this time is NOT usable for web interfaces! Anything you do to your mysql database is at your own risk and outside the scope of Anope support.
Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #2 on: October 04, 2007, 09:33:50 PM »

Well, then I'll prevent this on my own...
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #3 on: October 05, 2007, 12:37:03 AM »

anopes mysql db is to anope write only which means it should be read only to webinterfaces... as for how it dumps, I m not sure, but maybe anope drops everything in the db before exporting everything again to make sure old entries are gone...

as for preventing this on your own, that can't be done without changing the core, but like you said, from then on you are on your own. Changing the anope src will make you lose all support.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #4 on: October 05, 2007, 08:08:49 AM »

Yes I'll add a second cycle, 10 minutes after the first cycle, of the sync script, which checks, if the entries which where marked as be deleted are realy deleted.

Perhaps this "bug", or whatever is is, will be fixed in a later Anope version. :)
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

Pieter Bootsma

  • Team
  • *
  • Offline Offline
  • Posts: 189
    • http://geniusdex.net/
(No subject)
« Reply #5 on: October 05, 2007, 02:18:58 PM »

What version of Anope are you running?
Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #6 on: October 05, 2007, 02:58:37 PM »

1.7.19 with Unreal 3.2.7
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
(No subject)
« Reply #7 on: October 05, 2007, 03:17:42 PM »

Quote
Originally posted by ArmadilloPerhaps this "bug", or whatever is is, will be fixed in a later Anope version. :)


Well it's certainly not a bug, since there is nothing unexpected or wrong with how it has been implemented.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #8 on: October 05, 2007, 03:21:57 PM »

Because of that i added the " before and after the word bug. ;)

I called it bug, because i can't get the logic behind this process (deleting the users and add them from new).
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
(No subject)
« Reply #9 on: October 05, 2007, 03:29:21 PM »

Quote
Originally posted by Armadillo
Because of that i added the " before and after the word bug. ;)

I called it bug, because i can't get the logic behind this process (deleting the users and add them from new).


Well to put it simply, if the tables were not cleared first, you would get duplicate entries of each user record. Not too difficult to understand to be honest.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

heinz

  • Guest
(No subject)
« Reply #10 on: October 05, 2007, 03:42:31 PM »

The tables aren't "cleared", they're tagged. What happens is, we set a field to 0 for all entries in the database, we then set to 1 if we have them in memory, or, if they're not in the db, we add them. At the end, it deletes all entries with the field at 0.

If you don't have UseRDB enabled, then the MySQL database will get re-populated upon the first save.
Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #11 on: October 05, 2007, 08:07:06 PM »

Ahhh, ok, now I understand this issue! :) Thanks for the explanation heinz!
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0
Pages: [1]   Go Up