Jump to content
  • 0

Problem with database


RussianCaliber

Question

Hey guys!

So i'm not really sure is this in the right section

But i have a major problem with database and i'm really frustrated about it

So one day i got an admin call that players vehicle was missing so i went in to the server to investigate where did it go.

And it turned out that every single objects from objects_data was gone completely wiped there was only sandbags and freshspawned vehicles

So i went to see my backups and it turnes out that one day it just disappeared from the objects data, okay so now when i try to run a backup the objects data just stays the same.

I can see that the objects are in the database but they just don't overwrite in the database or get added again.

 

Any ideas what the heck is going on?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Can you manually insert/delete/change rows in your db?`So it's not a db issue itself?

 

If not the game may not be able to update anything there anymore. Is the user/passwort and connection details still correct? Any errors in any log file (server/client)?

 

Or is it only the backup that does not work when you try to import it into your db? Same rows with same values might not be able to get imported into tthe DB, if there are existing rows with same values.

You need to clear the tables and import your backup then. But I do not know what kind of backup you have (nmysql dump od everything?)!

Link to comment
Share on other sites

  • 0

Everything seems to be okay, got it working for a few hours as soon as the server restarted the objects got deleted again.

May it have been caused by the cleanupobjects = -1 by that?

It was working fine like 24 days and then boom everything is deleted like everything besides sandbags

 

If you want decay, set it for a positive number. If you don't want decay, set it for -10. See if that helps.

 

-CJ-

Link to comment
Share on other sites

  • 0

Are you using the Epoch events from here?

https://github.com/vbawol/DayZ-Epoch/blob/master/Server%20Files/SQL/add_recommended_mysql_events.sql

-- ----------------------------
-- Event structure for removeObjectEmpty
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectEmpty`;
DELIMITER ;;
CREATE EVENT `removeObjectEmpty` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes abandoned storage objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )
;;
DELIMITER ;

Are these your objects that are gone? All objects not changed/updated for 14 days, 24 days old and inventory empty? Sounds so.

Although I have no guess for the sandbags...maybe these got shot often and updated the damage ;)

Link to comment
Share on other sites

  • 0

I believe his problem arises here in the hive.ext config file. The older config files said if you set the number to -1, it would delete all placed objects each server start. The newer files says if it is set to 0, they will be deleted. If he changes the number in the hive.ext config file to something other than -1 or 0, then he should be good to go. A positive number will result in decay while a negative number should disable decay.

 

;Negative values will disable this feature
;0 means that ALL empty placed items will be deleted every server restart
;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted
;CleanupPlacedAfterDays = 6

 

-CJ-

Link to comment
Share on other sites

  • 0

I have disabled all the events on database

That might have been the -1 problem indeed

I have changed it to positive number and everything seems to be okay by now.

 

Thanks alot guys!

Yea, for some reason on my chernarus servers -1 worked just fine for no decay. On my Overpoch-Origins taviana it would just delte everthing every restart. I set it to 9999 as i doubt anyone is going to stick around for 27 years!

Then just schedule an event to delete item placed by a player after so much inactivity.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...