Raised This Month: $32 Target: $400
 8% 

Migrating SUM bans over to SourceBans


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-08-2014 , 22:27   Migrating SUM bans over to SourceBans
Reply With Quote #1

So one of the fellows I host (ArchangelGabriel) is using the SUM admin plugin and is wanting to change over to SourceBans.

Thing is, he's got the .sq3 file that stores the bans, and it's got a few years worth of bans on it. I've tried before to import the .sq3 file into SourceBans and even into PHPMyAdmin (both didn't work), and I'm a tad confused about how to migrate all the bans within the .sq3 file over to a SourceBans install.

Best idea I have is to try to view the .sq3 file in a plaintext format so I can modify it and remove any non-permanent bans, leaving just the permabans intact, and then further modify the formatting so that SourceBans recognizes it and imports it.

Anyone have any ideas?
404UserNotFound is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-12-2014 , 10:41   Re: Migrating SUM bans over to SourceBans
Reply With Quote #2

You can use something like SQLite Database Browser to open the .sq3 file and see the data. You can also write a script to migrate it. For example in PHP you can use PDO:

PHP Code:
$db = new PDO('sqlite:sumdb.sq3');

foreach (
$db->query('SELECT * FROM banlog') as $row) {
    
// Insert into SourceBans database

__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-25-2014 , 07:38   Re: Migrating SUM bans over to SourceBans
Reply With Quote #3

Quote:
Originally Posted by DJ Tsunami View Post
You can use something like SQLite Database Browser to open the .sq3 file and see the data. You can also write a script to migrate it. For example in PHP you can use PDO:

PHP Code:
$db = new PDO('sqlite:sumdb.sq3');

foreach (
$db->query('SELECT * FROM banlog') as $row) {
    
// Insert into SourceBans database

i have no idea how to use that code, DJ Pie Safety
404UserNotFound is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-28-2014 , 12:02   Re: Migrating SUM bans over to SourceBans
Reply With Quote #4

Then I guess someone will have to write a script for you to migrate the bans.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-28-2014 , 23:31   Re: Migrating SUM bans over to SourceBans
Reply With Quote #5

Quote:
Originally Posted by DJ Tsunami View Post
Then I guess someone will have to write a script for you to migrate the bans.
That makes sense
404UserNotFound is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode