Persistence
This section lists the persistence options and shows how to use each.
📄️ Choose your approach
Root supports two ways to store persistent data in your server: a key-value store and a SQLite database. The key-value store is fully ready to use while SQLite requires some setup. This article explains what they are and when to use each.
📄️ Key-value store
The KeyValueStore type stores your data as key-value pairs. Data is stored in a SQLite file so it will persist across restarts of your server. Root automatically backs up and restores the data file so you won't lose data if your server restarts unexpectedly.
📄️ SQLite database
Use a SQLite database to store your structured data persistently.