Unlink Images from database to reduce the size
I have a database of my client session records which is now over 1 Gb in size mainly due to the images.
Each session has multiple images of my handwritten notes. I find Ninox to be extremely intuitive and useful in my workflow. But the downside is the huge increase in database size.
My plan is to unlink images from records older than 2 years and store them on my local drive (and not on Ninox cloud). I am thinking of the following steps:
1) Identify records older than 2 years. Find the images and store it on the local hard drive - prefixed with the relevant record ids.
2) Capture the link to the local image and store that in the record. What this means is that images for records older than 2 years can only be accessed on local drive and not on the cloud. I am ok with this limitation.
3) Once this works, then I need to delete the images from the database.
4) Not sure if there is a need to compact the database :-)
5) Put this in a special script which is given a date as a parameter to work from. I can then run this periodically.
I have the conceptual plan but not sure about how this will work on Ninox. Any and all help on this will be appreciated. Suggestions for a better plan are also most welcome and appreciated.
Thanks in advance
The simplest approach could be to create a backup of the database including the files and download this offline. You can then open this in the ninox mac/iOS app without using Ninox cloud.
If you download the archive and change the extension to a .zip file, you’ll be able to see that the files are very obviously accessible within the archive, nested in folders by table and record ID. This is a very easy way to extract them out without using the API.
In answer to your queries:
1) Identifying records with files and handling them automatically on an ongoing basis will require use of the API and a 3rd party service to handle the files (e.g. make.com).
2) The danger with having a link to the local file is that if the folder/drive mapping changes then there may be a lot of links to update. It may be better to use a cloud-based service such as google drive/onedrive/pcloud to store them as they can have unique links to files.
3) Deleting files from Ninox can only be achieved either by human interaction or via the API
4) Removing files will compact the database. You could also consider archiving how I mentioned at the top of this message offline, using a tool to compress the images/reduce their file size, then reimport the archive to Ninox (now with compressed images) to use less space
5) The above answers will show you that this can be run in a script, just bear in mind that limitations with Ninox will mean that deleting a file will always require an API call to Ninox to action deletion.
Hope this helps!
- 1 yr agoLast active