HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: mvdarend on November 13, 2015, 06:56:40 PM

Title: Move statistics database
Post by: mvdarend on November 13, 2015, 06:56:40 PM
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.
Title: Re: Move statistics database
Post by: bkenobi on November 13, 2015, 08:26:24 PM
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.
Title: Re: Move statistics database
Post by: mvdarend on November 13, 2015, 08:36:16 PM
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.
Title: Re: Move statistics database
Post by: kevin1 on December 07, 2015, 03:43:02 AM
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
Title: Re: Move statistics database
Post by: kevin1 on January 03, 2016, 05:33:55 PM
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.