Does Matomo/Piwik store any persistent data on the filesystem? - matomo

Does Matomo/Piwik store any persistent data on the filesystem? I am hoping that apart from the config ini file the rest is all disposable and the persistence is all kept on the database. Is this correct?
Thank you.

Nearly all Matomo data is stored in the database, so you can delete it and replace it with the latest version without any changes.
There are just a few exceptions:
config/config.ini.php: This file includes important settings and the db connection details. It shouldn't be deleted
plugins/themes from the marketplace: They get extracted into the plugins folder. Of course you can reinstall them again.
/tmp: Everything in this directory can be deleted without any consequences (apart from a short slowdown when everything is regenerated
favicon: If you upload a custom favicon/brand logo, it ends up in the misc/ directory
geoip database: They are also stored in the misc/ directory.

Related

VB.NET Copying Database template files to selected folder location during installation

net project as well as a setup project. I also have it so that during installation it asks the users to enter a file location to store their database. the plan is to have an empty .mdf file, with all the tables setup, copied into that folder and I store the folder path in a config file.
this is mainly because I am planning on having multiple separate applications that all need the ability to access the same database. I have it storing the folder path in my config file the only thing I'm having trouble with is
storing the template files I don't know if i should do this in the setup project or main project
how to copy said template files into a new folder
so far I have been unable to find a solution so any help is appreciated
Well here is what I do this in a few of my projects - something that has proven reliable enough for me over the years (which you may or may want to do as well):
I have the program itself create the database files in an initialization routine. First however, it creates the sub folders in which the database files will be stored, if they don't already exist.
To do this, the program just checks if the folder exists and if the database file exists and if they do not, it creates them on the spot:
If Directory.Exists(gSQLDatabasePathName) Then
Else
Directory.CreateDirectory(gSQLDatabasePathName)
End If
If File.Exists(gSQLiteFullDatabaseName) Then
Else
...
I also have the program do some other stuff in the initialization routine, like creating an encryption key to be used when storing / retrieving the data - but that may be more than you need (also, for full disclosure, this has some rare issues that I haven't been able to pin down).
Here too are some addition considerations:
I appreciate you have said that you want to give the user the choice of where to store their database files. However, I would suggest storing them in the standard locations
Where is the correct place to store my application specific data?
and only allowing the users to move them if the really need to (for example if the database needs to be shared over the network) as it will make the support of your app harder if every user has their data stored in different places.
I have found letting the user see in their options/settings windows where their database is stored is a good idea.
Also to encourage them to back those files /directories up.
Also to create automatic backups of several generations for the user.
Hope this helps.

What is the correct way to update a desktop software after editing its database?

I have a desktop app that is in use by my clients. From time to time I fix some bugs, add features, and push new updates. An update works like this (automatically):
Download new files for the app (Winrar).
Extract the files to a temp folder.
Copy the files to the app folder (overwrite the existing ones).
That's it. I don't touch the Database, which is an MS Access file in its own folder. I just update the files, not the database, because I don't want the clients to lose their data.
Now I've made some schema changes to the database (added some columns, tables...), so I have to update the database file this time as well.
How can I update these database files so the clients won't lose their data?
One option is defining the changes as a series of SQL commands such as ALTER TABLE to run against the database. Put these commands in a special file (or files) and build logic into your updater (or during the launch of your app) to detect and run them.
This has the additional benefit of allowing you to keep these changes with the version control system managing the source code for your app.

Which Drupal 7 database table is file uploaded to?

I am working on drupal 7 which has content type that has a filed "file" and the file is uploaded to mysql database.
I would like to find the table where the file is stored as binary BLOB type.
Know the node ID.
Unless you have something special installed that I'm not familiar with, the files themselves aren't stored as binaries/serialized/etc in the DB. The file table (or is it the filr_managed table? I apologize, I'm on my phone and will try to answer more fully when I sit down at a computer) just stores things like the file id (fid) and the path to the file.
As I understand it, storing the files themselves, fully in the DB would lead to some pretty heavy/intense DB call times.
I'm not sure if this is a reason why you expect it to be in the DB, but if you are looking for the files to be accessible following their nodes access, you'll want to look into setting up private file storage outside of the Drupal root directory.
If you have a default configuration, you will find your files in the filesystem, in the following subdirectory of your Drupal installation :
drupal/sites/default/files
If you want to store all the file in the DB, tou can by using a hook on saving file, but it is not recommended for performance reason. Better to acces a file by URL than download it from database.

Reading Properties of all Files existing in one of the folders on Application Server and print on a JSP

I have to read the Name and Creation Date/Last Modified Date of all the files that may exist on /product/xyz folder, existing on JBoss Application Server and print the same on JSP.
This folder is being loaded with the fresh files when server is booted. The framework used is Struts 1.2.
Any hints or examples around how to read these information and print on JSP? Thanks!
EDIT :
I understand that it is much easy to read the files from a folder which might be part of my workspace folder. But, this is a different scenario.
Here, the JSP file will be deployed on JBoss application server, in some ABC folder, as part of some EARs. On the same application server, there is some other XYZ location, which will be loaded with the fresh files, when server is booted. I want to read the files existing in that XYZ folder. I Hope the scenario is more clear now.
The code doesn't change whether I try to access the files from my Work Space folders (Rather, which are to be part of EARs) or I may access from the Server File System (Outside the EARs).
The issue could be there in Path Mentioned or the Permission (Read/Write) to the Folder from which the files are being read.

grails file upload

Hey. I need to upload some files (images/pdf/pp) to my SQLS Database and thereafter, download it again. I'm not sure what is the best solution - store it as bytes, or store it as file (not sure if possible). I need later to databind multiple domain classes together with that file upload.
Any help would be very much apreciated,
JM
saving files in the file system or in the DB is a general question which is asked here several times.
check this: Store images(jpg,gif,png) in filesystem or DB?
I recommend to save the files in the file system and just save the path in the DB.
(if you want to work with google app-engine though you have to save the file as byte array in the DB as saving files in the file system is not possible with google app-engine)
To upload file with grails check this: http://www.grails.org/Controllers+-+File+Uploads

Resources