diff --git a/docs/features/DATABASE.md b/docs/features/DATABASE.md new file mode 100644 index 0000000000..85829bef86 --- /dev/null +++ b/docs/features/DATABASE.md @@ -0,0 +1,35 @@ +--- +title: Database +--- + +# Invoke's SQLite Database + +Invoke uses a SQLite database to store image, workflow, model, and execution data. + +We take great care to ensure your data is safe, by utilizing transactions and a database migration system. + +Even so, when testing an prerelease version of the app, we strongly suggest either backing up your database or using an in-memory database. This ensures any prelease hiccups or databases schema changes will not cause problems for your data. + +## Database Backup + +Backing up your database is very simple. Invoke's data is stored in an `$INVOKEAI_ROOT` directory - where your `invoke.sh`/`invoke.bat` and `invokeai.yaml` files live. + +To back up your database, copy the `invokeai.db` file from `$INVOKEAI_ROOT/databases/invokeai.db` to somewhere safe. + +If anything comes up during prelease testing, you can simply copy your backup back into `$INVOKEAI_ROOT/databases/`. + +## In-Memory Database + +SQLite can run on an in-memory database. Your existing database is untouched when this mode is enabled, but your existing data won't be accessible. + +This is very useful for testing, as there is no chance of a database change modifying your "physical" database. + +To run Invoke with a memory database, edit your `invokeai.yaml` file, and add `use_memory_db: true` to the `Paths:` stanza: + +```yaml +InvokeAI: + Development: + use_memory_db: true +``` + +Delete this line (or set it to `false`) to use your main database. diff --git a/mkdocs.yml b/mkdocs.yml index f1239dc318..06ec818d46 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -150,6 +150,7 @@ nav: - Overview: 'features/index.md' - New to InvokeAI?: 'help/gettingStartedWithAI.md' - Configuration: 'features/CONFIGURATION.md' + - Database: 'features/DATABASE.md' - Control Adapters: 'features/CONTROLNET.md' - Image-to-Image: 'features/IMG2IMG.md' - Controlling Logging: 'features/LOGGING.md'