Unpin and Delete
How are old databases removed from IPFS
Removing old databases from IPFS is crucial to maintain a clean and efficient storage environment. This operation involves removing the data from IPFS and deleting the associated metadata.
This operation is handled by the /api/unpin-database endpoint and the /api/delete-database in the backend respectively, however that endpoints are not intended for external use. Both of these operations are handled automatically when interacting with the appriprate '/api/query' endpoint suitable for programatic use.
API Route
- Route:
/api/unpin-database - Route:
/api/delete-database - Operation:
unpin - Operation:
delete
Key Operations
When unpinning and deleting databases using the above endpoints via the UI, the following operations are performed:
- Authenticate the request
- When a new version fo the database is created, the old version is unpinned from IPFS
- After a suitable amount of time, the old version is deleted from IPFS automatically
- If the database is deleted (not just unpinned due to a new version), the associated metadata is also deleted from the Arcsec database, including the encryption keys.
Usage
You can delete databases using the UI interface. Simply navigate to the "Database" tab and click the "Delete" button. To delete all databases you cerated, you can do so in the Settings page. Unpinning is never triggered by itself, but is automatically performed when a new version of the database is created or when a database is deleted.