Hi,
I Have quite often to analyze what happened to missing or corrupted file/folder.
History feature is nice, but not very handful.
Would it be possible to download all history of a Library in a single file ? Including all details of action, date, who, client, client version …
So we could use grep and other cool unix tools to perform searches.
It’s that what you get if you click on the history icon at library view, but paginated? Maybe you can find out the api request and hax together a curl | grep command to do what you want?
Isn’t that what’s in the commits subfolder (seafile-data/storage/commits)?
Each of the files has the following contents: (Some redaction applied to one of these files on my server)
{“commit_id”: “xxx”, “root_id”: “xxx”, “repo_id”: “xxx”, “creator_name”: “xxx”, “creator”: “xxx”, “description”: “Added or modified “xxx”.\n”, “ctime”: time, “parent_id”: “xxx”, “second_parent_id”: null, “repo_name”: “name”, “repo_desc”: “desc”, “repo_category”: null, “device_name”: “device”, “client_version”: “1337”, “no_local_history”: 1, “version”: 1}
If I’m correct, each library has its own hex-no. and commits are in the corresponding folder. Hence, you could get all the information from these files.
The idea is a (slightly) different approach but basically what @Gronis already proposed.
(I could be wrong, maybe some additional information is stored somewhere else.)
Thanks for the tips,
I’ll find a way with seafile-data/storage/commits and API.