Where does Tonfotos stores data?
Since we are talking about long-term data preservation, then we are not talking about just any type of data, but about user-editable data only. As of v. 1.3.12 Tonfotos uses several places to store user editable data:
- Tonfotos database
- Image metadata
- ini files next to original images
Tonfotos database
(please see this post for more details about tonfotos database location and its backup)
Event thought database is critical for Tonfotos operation, majority of data it holds in actually a copy of data originally stored somewhere else. However, since this data is collected in one place Tonfotos can operate fast and helps you navigate your collection in realtime, even if some of files are located on sources that are disconnected at the moment.
Database-only types of data
However, there are still some types of data that are only located inside database and currently not being stored anywhere else:
- Albums. This is by design, albums are like tags, but the only difference they are stored in database, not in files metadata. If you don’t want that - use tags instead.
- Changes to faces and people on files that are located on disconnected drives. You can work with faces (assign them to people) even if some (or all) files are currently unavailable. Since Tonfotos can’t store this data into ini files, it will remain in the database until your external drive will be plugged in again, or connection to network drive will be established again, then changes will get flushed into ini files for long term storage.
- People details, relations and so on. In future this data will also be synchronised to some kind of external database that several copies of Tonfotos will be able to share and use simultaneously, but for now this is only kept in database only.
Image metadata
Image is considered as the primary source of many types of data, and Tonfotos database only serves as a cache. Whenever user changes this data it gets written to original file. Those are:
- Tags
- Image Caption
- Comment
- Image creation date
- GPS Location
ini files
The only type of metadata that does not get written right away into metadata is people faces. The main reason for that is that XML standard is not adequate to store all necessary data that is needed to work with faces (no id’s, no date stamp and so on). Also, storing this data in image metadata would require mass writes to thousands of files every time you rename a person, which is not great user experience.
Instead, Tonfotos stores this data in form of ini files next to original images. This way even if Tonfotos database will be lost for some reason, information about people will get automatically restored during next scan. Also, thanks to those ini files, several copies of Tonfotos can work with same image archive (such as on shared network drive) an automatically synchronise information about people on images.
It is possible, that in the future there will be added functionality to also write this data into image metadata, but that is not yet confirmed.