I run Joplin (1.0.218) synchronized to Nextcloud (19.0.0) and I realized that Nextcloud stores a horrendous amount of files related to Joplin.
The directory
<docker mounted directory for Nextcloud>/myuser/files_versions/Joplin/.sync
currently has above 280,000 files. They are all called version.txt.vX
where X
is a number (version.txt.v1591639617
for instance).
What are these files? Is there a way to reduce their number? (I hope so, I will run short of inodes at some point)
Probably some versioning files that Nextcloud or some other tool is creating.
Joplin doesn’t create files named version.txt.vX
I too have this version.txt file.
My Android clients synch with folder Notes/Joplin
on Nextcloud.
My linux joplin is set to filesystem sync to a local folder that is synched to Notes/Joplin
on the Nextcloud server using nextcloud client.
local:
Cloud/Nextcloud <-- this is synched to server
Cloud/Nextcloud/Joplin <-- where the notes are
Cloud/Nextcloud/Joplin/.sync/version.txt
It is a one-byte file containing just 1
(note that the missing final newline strongly hints at Joplin). This file is updated (new file, same contents) every time joplin synchs something from (not to) remote.
When you google nextcloud sync "version.txt"
you get several hits on Joplin/.sync/version.txt
so it does seem Joplin related.
A grep for version.txt
in the joplin sources has several hits, e.g.
ReactNativeClient/lib/synchronizer.js:254:57: const syncTargetVersion = await this.api().get(’.sync/version.txt’)
Do you have one single .sync/version.txt
file, or are there many of them, in the format .sync/version.txt.v<a number>
? Not in the Nextcloud interface (where I see only one .sync/version.txt
) but directly on the filesystem.
I do not know Nextcloud but it has a versioning mechanism. I feel that the versioned files may be of the form filename.extension.v<a number>
and that something goes wrong with the versioning of the version.txt
file (which you pointed to in the Joplin sources)
There is a single version.txt
, but since it is recreated upon every synch, Nextcloud dutily retains the old versions. So yes, the version.txt.v<a number>
is specific to Nextcloud, but the continuous recreation of the file is caused by Joplin.
Nexcloud does have a retention strategy to keep the number of version files within limits. For example, I have only 33 old versions of version.txt
. So I wonder why OP has thousands.
Yes Joplin creates a version.txt file, but:
Joplin doesn’t create files named version.txt.vX