Database location?

I’ve looked around in the program settings, FAQs, help docs, and this forum - perhaps I’m missing something obvious, but I’ve been unable to find out how to set the location of the program’s database…? In other words, the path to which it stores its usage information (for inclusion in system backups, so I can retain it after reformatting, so I can move it to a potentially faster device, etc).

Thanks in advance for your help! :smile:

I used Resource Monitor (aka perfmon.exe /res) to filter Disk activity for GWCtlSrv.exe and found the DB:

%programdata%\GlassWire\service

It is an SQLite DB, and it’s contents can be viewed Database Browser for SQLite. Hmm… might want to encrypt this sucker.

2 Likes

Ok, that seems to be it…so, 2 follow-up questions:

  1. Is there really no way to choose your own location (other than using junction points)? That seems like quite a major shortcoming.

  2. Even more importantly, it will not let me copy storage.db or glasswire.db; Windows gives the error “You require permission from Administrators to make changes to this file.” While my current user account is an administrator, just to be even more explicit, I added my user account to the “Security” tab of the file properties (with Full Control), but the issue remains. I also took ownership of the files - still the same issue! Stopping the service before attempting to copy the files doesn’t make it work either, of course. Not sure why they make it such a hassle to move/backup the database - I don’t have this problem with any other services on my system (including ones that utilize SQLite databases - i.e. ManicTime, to name just one).

How can I simply backup the database…? :stuck_out_tongue:

Sure, you can move the glasswire database to another folder. Here are some instructions:

  1.   Open the C:\ProgramData\glasswire\service\ folder;
    
  2.   Create the file glasswire.conf
    
  3.   Add this string to the glasswire.conf:db_file_path=d:\glasswire.db                
    

Instead of the “D:\glasswire.db” you can set any other path, which is preferable for you. Now
if you restart the service, the new database will be created at d:\glasswire.db.
The previous database will be kept at the C:\ProgramData\glasswire\service\glasswire.db. Also you may stop the service, move the C:\ProgramData\glasswire\service\glasswire.db to D:\glasswire.db, and start the service. In that case Glasswire will continue to work with the previous database. The service may be stopped and started at the task manager’s “Services” tab or at the Windows Service manager.

I hope this answers your question. Please let me know if you run into any issues.

1 Like

Perfect! That worked. However, two remaining questions:

  1. Is storage.db irrelevant and doesn’t need to be backed up (i.e. not necessary to be retained if my system is reformatted, if I want to revert to a previous Glassware “state”, etc)? What does this file actually contain (currently, it’s empty on my system)?

  2. More importantly, there’s still the 2nd issue I mentioned above of not being able to copy the database file (even if I stop the service, take ownership, and issue my user full permissions). I’ve seen this error due to incorrect ownership, but in this case, even taking ownership doesn’t work. Are you able to freely copy glasswire.db via Windows Explorer? I’ve Googled extensively and every solution refers to taking ownership, which again, is not working…

Thanks!

If we encrypted the database then it would use major resources, plus another GlassWire user could open it anyway but you’re welcome to encrypt it on your own or just use “Incognito” mode all the time with no logs.

You can back up the database if you want but only if you need to keep the data for some reason in case of a crash.

I’m not sure I understand the other question.

Hi Ken,

…Which question were you confused about? It seems that you didn’t really address either of the two…:

  1. What does [the storage.db] file actually contain (currently, it’s empty on my system)? (The reason I ask is, the answer you previously provided for relocating the database was only given for moving glasswire.db, but not storage.db, which appears to be a 0kb file)

  2. It will not let me copy (backup) storage.db or glasswire.db; Windows gives the error “You require permission from Administrators to make changes to this file.” While my current user account is an administrator, just to be even more explicit, I added my user account to the “Security” tab of the file properties (with Full Control), but the issue remains. I also took ownership of the files - still the same issue! Stopping the service before attempting to copy the files doesn’t make it work either, of course. Not sure why this file would be un-copyable - I don’t have this problem with any other services on my system (including ones that utilize SQLite databases - i.e. ManicTime, to name just one).

Hi Metal450,

  1. I don’t know the answer. I’ll ask and see what I can find out.

  2. I don’t know why it would do this either. I will ask.

I don’t know a lot about the database yet. I haven’t experimented with it at all. Sometimes when I’m unclear it means I don’t know the answer, sorry. :smile:

No prob, looking forward to your reply! :slight_smile:

Here is what I learned. Maybe it will help.

You do not need to backup the storage.db. This database may be changed
from release to release. Currently it contains the service information
which is required for traffic type determinations (protocol names etc).

For the issue with the glasswire.db file copying maybe try to
run Windows Explorer as Administrator and copy the file within the admin
instance of the explorer. Also as far as I understand, you have granted the permissions to your own account, which is not in the “Administrators” group. In that case you
need to add your account into the “Administrators” group.

Also you should stop the GlassWire service before copying to avoid corruption. I hope this helps. This is all the info I could find out.

as far as I understand, you have granted the permissions to your own account, which is not in the “Administrators” group. In that case you need to add your account into the “Administrators” group.

My own account is in the administrators group. I only tried messing with permissions as a possible solution, because it didn’t work originally without doing so (tho again - I am an administrator).

Also you should stop the GlassWire service before copying to avoid corruption

Yup, as mentioned I had tried that.

maybe try to run Windows Explorer as Administrator and copy the file within the admin instance of the explorer

Didn’t work. Here’s a video where you can see exactly what I’m doing: first, I’ll show the conf file, just so you can see where my glasswire.db is (D:\AppData\GlassWire). Then you can see me explicitly launching an explorer instance as administrator, browsing to that location, and attempting to copy the db file, which renders the error.

Again, I’ve really never seen this happen before with any file…not sure what’s going on… :frowning:

Strange. We’ll try to figure it out. Thanks for reporting this.

Sorry about the link flag problem. The forum automatically flagged your posts as spam for some reason but I undid it so you can post links again.

Thanks, look forward to your reply :slight_smile:

Would it be possible to add an option to backup or move the database location from within Glasswire’s Interface? And also let Glasswire do it for you automagically, maybe it might solve the problem, since Glasswire created it and modifies it all the time. I don’t know how frequent it writes data, but I would like to save my SSD’s life as much as possible :blush:, and I’m sure there are people who would love this feature without going deep into your system and writing your own config file.

As for Metal450, I don’t know if this means anything, but I have no issues copying and pasting the glasswire.db on my Windows 8 system. I notice you are using Windows 7, could this be an OS issue? Although I doubt it since Windows 7 and Windows 8 changes are mostly graphical.

Edit: I just thought of something, can you try to do this in safe mode? Maybe another application is preventing you from doing this?

1 Like

Would it be possible to add an option to backup

Not useful for me personally; I have my own regular backup-scheduling software that I use (which backs up every other relevant data file on the system - this seems to be the only one it can’t copy)

move the database location from within Glasswire’s Interface

That does seem like it should be an available option, but not at all critical as editing the conf file is trivial.

maybe it might solve the problem

Does not in any way solve the issue of not being able to copy the file.

can you try to do this in safe mode? Maybe another application is preventing you from doing this?

As the video shows, it’s a permissions issue (not a sharing violation). In any case, the only process that’s holding the file is GWCtlSrv, the glasswire service (per sysinternals).

Hi,

As far as I can see on the video, you are trying to paste the copied DB to the same folder. Did you try to paste it to another one? Maybe the issue is in the folder permissions?

Not folder permissions, I just pasted to the same folder for quickness/convenience. It’s the same issue no matter where I paste (or no matter what program I use to copy - i.e. win explorer, backup software, etc)

I read up other encounters of this similar problem on the internet, and some suggested that disabling their antivirus worked as some antivirus now can prevent unwanted modifications to certain files/folders, so I just suggested the easiest and safest way which is safe mode, since I do not know what other programs are running on your PC. If it doesn’t work, at least we can rule it out.

Tried it, same error in safe mode.

Do we have any updates on this? It’s been 3 weeks, I’ve spent several more hours on this as well as consulted with a half-dozen coworkers (including a win7 sysadmin; I myself am a programmer/software dev). None of the typical Windows permissions, ownership tricks, etc work, and this problem is totally unique to glasswire.db. The problem definitely isn’t permissions/ownership of the parent dir, as I can create/copy/delete any other file I want in that dir; I can also stop the service & delete glasswire.db - the new glasswire.db file that glasswire creates, however, cannot be copied. I’ve posted on general Windows discussion boards, and everyone is stumped. Again, this only happens with glasswire.db, and it happens with a brand new glasswire.db. I’d really like to get this file included in my backup, so the backups don’t report as “failed” each and every day (due to being unable to copy just this one file)…