Change storage location in sqlite base under windows

Hello,

For reasons of confidentiality on a working pc under windows it is possible to modify the location of the sql lite database under the user profile (because it is in plain text) to another location or failing to encrypt this locally based, much like standard notes does?
Thanks a lot for your answers

It’s not officially supported, but you could try specifying a database path relative to the default app directory.

In config.json, add

"databaseFilename": "..\..\EncryptedDir\db",

Replace the path with the correct one for your scenario. I’m not sure how relative paths are specified on Windows, but it should be possible.

Once you change the setting, start Everdo and it will create an empty database in the specified localtion. Once you verify that the database is created in the right place, you can replace it with your actual database from the original app directly.

Hello,
thank you very much for this reply.
By cons I can not find the file config.json in the directory of the everdo application, I have to create it?
What is the syntax to respect?
Thank you

Of course, I forgot to mention that the config file only gets created once you change something in the default configuration. Just go to app settings or press Ctrl+,, then press apply. That will save the configuration to the file.

Regarding the syntax, you will see lines as follows. You’ll need to add the databaseFilename setting to specify the path.

{
"zoomFactor": 1,
"weekStartsOnMonday": false,
"archiveDays": 90,
"databaseFilename": "db"
}

You can use this exact syntax, just be sure to replace db with the actual relative path. Make sure to leave the quotes in place.

Hello,

I just modified the config.json file everything is ok now, thank you very much once again.
Do you plan to add this possibility in a future version?
Have a good day

I would like this configuration setting to work with absolute paths. That would be easier to configure for the user. Also documenting this would help. Other than that, I think it works pretty well.

I can now confirm that in the next desktop update there will be an option to specify the data directory as a command line argument. For example you will be able to launch two apps as simple as this

$ everdo --multiInstance 
$ everdo --multiInstance --dataDir /home/user/.config/everdo-2

It seems the “databaseFilename” option works only with relative paths, so it’s not possible to move it to a different partition that way. The --datadir switch will be highly appreciated, but it would be nice if there would be also such an option in the config.js file to set the default data dir.

The --dataDir is definitely coming. The goal is to deprecate databaseFilename as it becomes redundant (not to mention inferior). Why do you think you might still need it?

I meant a dataDir JSON config option, not the databaseFilename option. I guess the latter is not needed because it is called db anyway. However, it would allow putting all the db files inside one directory (on a different hard disk), so it might still be interesting.

Currently I don’t have a need for multiple instances, but I can imagine they may be useful, e.g. for better separation of work and private tasks, with mabye also different synchronization and data privacy needs.

My use case is that I want the default data dir to be on my data partition, not on my system partition. When there is only a --dataDir CLI option, then I would need to specify that every time on the command line or create a special launcher script with that option. If I could change the default data dir in the config, then I can just run the normal Everdo command with my app launcher.

Btw, is there anything else that goes into the data dir besides the db file?

A few things go into to the data directory. Some files are tied to the specific instance of the database, so they will cause problems if reused with another instance of the database.

In general, going forward it will be assumed that the database and all auxiliary files are kept in the same data directory (system default or explicitly specified).

It is correct that a shortcut for launching the app will need to include the directory override if necessary.

1 Like

Ok, if there are always several files (with fixed names) that belong together then the database file name does not need to be configurable separately either, and each instance should get its own data dir. Still, it would be useful to make the default data dir location configurable. Similar to Firefox profiles then. Here I also always move my default profile to my data partition.