more G-Labs products

Author Topic: Move statistics database  (Read 1360 times)

November 13, 2015, 06:56:40 PM
Read 1360 times

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Is it possible to change the location of the Statistics database? I've searched the the settings and other config files but can't seem to find a reference to the database location.

I'd like to move it to another drive if possible.

November 13, 2015, 08:26:24 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I have not tried it, but I believe you might be able to do this by copying the homegenie_statistics.db file to another location and then creating a symbolic link to it.  The only issue I see is if that drive is not available at startup or when HG wants to write to the DB.  In that case, HG could either crash, create another file somewhere, not write at all, something else entirely?

I have my log files writing to a different drive and when that location isn't available, HG writes to a local file.  When the remote drive comes online, I end up with missing data.  In my case, I don't care that much.  In the case of statistics, I could see that being an issue potentially.

November 13, 2015, 08:36:16 PM
Reply #2

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
The only issue I see is if that drive is not available at startup or when HG wants to write to the DB.  In that case, HG could either crash, create another file somewhere, not write at all, something else entirely?
Thanks I didn't think of that, I think I'll leave it as is. I have a new HomeGenie server with a small drive, but moving the Stats won't make too much of a difference anyway.

December 07, 2015, 03:43:02 AM
Reply #3

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
would moving the db allow it to be maintained through hg updates (structure is backwords compatible)?  I update frequently and lose the db every time which sucks

January 03, 2016, 05:33:55 PM
Reply #4

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
like to make this a built in HG feature.... I keep losing my data every time I switch HG versions :(. please make a path option in HG to relocate this db so it isn't lost every time I switch,/upgrade/downgrade.