On a seafile pro installation, I want to generate a custom report on file changes.
I am using the FileHistory table in seahub-db for that purpose and it looks good.
However, the problem is the table does not seem to get updated ad-hoc.
How can I (from the command line) trigger updating that table
what is the query that is used to fill that table?
No need to trigger a table update. The table gets updated the moment a new version is created.
The history of a single file is loaded from the database. Not every modification is written in the database though. Please have a look at the [FILE HISTORY] function in seafevents.conf: seafevents.conf - Seafile admin manual
Thank you. Reading the documentation, I am confused:
My impression had been that FileHistory table is just a log of what changes occurred where and when, but citing the manual:
## The 'threshold' is the time threshold for recording the historical version of a file, in minutes, the default is 5 minutes.
## This means that if the interval between two adjacent file saves is less than 5 minutes, the two file changes will be merged and recorded as a historical version.
‘recording the historical version of a file’ sounded to me like file version history? E.g. like being able to go back to an older version of a file?
Cause I would not want to mess with those settings.
Why did you quote two lines of the manual, but not the - decisive - next line?
## When set to 0, there is no time limit, which means that each save will generate a separate historical version.
In other words, when set to zero, the file history is a complete log of the life of the file, no matter how big or small the diffs between the versions are.
Maybe your confusion originates from a misinterpretation of Seafile’s file history menu.
Let me explain: Every time you change a file and you save, the document is committed and saved in Seafile’s storage backend. You can restore every version! This said, Seafile does NOT create a new record in the file history every time you save a modified file. This is done with usability in mind.
Imagine you work on a document and you save every other minute. The differences between the version of the document are minuscule. If every version of the file was recorded in the file history, you’d be swamped. This is why Seafile creates a new record in the file history every other minute. If you want every single save to be logged in file history, set
enabled = true
threshold = 0
No, the confusion is with the wording of the manual and whether the [FILE HISTORY] section in seafevents.conf deals with saving and keeping old versions of a document (corresponding to the [history] section in seafile.conf) or is some sort of audit feature.
Now, the last question I have is this: Can I set the list of file extensions to a wildcard? “*” does not seem to work.