Your instance handles these temporary files in the /tmp
directory during the process of building and using the KDTree for the ReverseGeoCoderService in the Nextcloud Photos app. Specifically, these files are created when the KDTree is built or loaded, and the data from these temporary files is then copied to a permanent file named cities1000.bin
located in the data/appdata_$instanceid/photos/geonames/
directory.
- Creation: The temporary files are created whenever the KDTree is built or accessed.
- Usage: They are used to temporarily store KDTree data before it is written to the permanent
cities1000.bin
file. - Lifecycle: After the KDTree data is copied to
cities1000.bin
, the temporary files are no longer actively used by the application.
- Since the KDTree data is already copied to the permanent file (
cities1000.bin
), the temporary files in the/tmp
directory are redundant. - It is safe to delete these temporary files as they are no longer needed once the
cities1000.bin
file has been updated.
It is unusual for the cities1000.zip
to be repeatedly downloaded and processed. The code is designed to check if the cities1000.bin
file already exists before initiating a new download:
This check ensures that the download and processing occur only if the cities1000.bin
file is missing or if a forced update is triggered.
“forced” is only triggered if you invoke the occ command:
occ photos:update-1000-cities
Note that the /tmp
directory is typically mounted as a tmpfs
, meaning its contents are cleared on system restart. If this is not the case on your system, consider configuring it to ensure /tmp
is mounted as tmpfs
. This configuration helps maintain the transient nature of temporary files and may resolve issues related to file persistence or repeated downloads.
→ Here ← I have explained the steps how you can move your /tmp
directory to tmpfs
.
Much and good luck,
ernolf