jehon
(Jehon)
November 18, 2022, 1:53pm
1
Dear all,
In the vfsMeta, we have informations about all files of the cache (mirror of vfs).
File look like:
{
"ModTime": "2022-11-18T13:45:54.834414152Z",
"ATime": "2022-11-18T13:45:54.834715354Z",
"Size": xxx,
"Rs": [
{
"Pos": 0,
"Size": 2081902
}
],
"Fingerprint": "xxx",
"Dirty": false
}
-> Where is this structure documented?
-> How could I know if the file is in the upload queue or only in the read cache?
Thanks
It's all on github so feel free to browse away:
That's in the log file as it's queued to upload.
ncw
(Nick Craig-Wood)
November 18, 2022, 2:20pm
3
jehon:
-> Where is this structure documented?
It isn't designed to be used externally out of rclone and may change at any time!
Here is its definition
The Ranges are defined here
I don't think there is an API for that. You can check how many files are in the queue using the API.
jehon
(Jehon)
November 23, 2022, 9:42pm
4
When is the dirty set to true? Isn't that when the file is modified locally? and set to false when the modification is uploaded?
jehon
(Jehon)
December 15, 2022, 11:14am
6
For those coming here, here is a quick bash script that list uploading files:
grep --recursive --ignore-case --files-with-matches '"Dirty": true' /var/cache/rclone/vfsMeta
where /var/cache/rclone/vfsMeta is the cache set by cache-dir option
Hope to help anyone
Rationale:
There is a json object under /vfsMeta that store the status of each file (under the CLOUD path).
When the file is modified locally (dirty), a " Dirty: true " is set on the file.
The script will iterate on all object, and look if it is dirty or not.
Caveat: not checked on huge cache :-/
system
(system)
Closed
December 18, 2022, 11:14am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.