2018-08-08 07:07:02 +00:00
|
|
|
# Importing an existing SQLite database from another installation (optional)
|
|
|
|
|
|
|
|
Run this if you'd like to import your database from a previous default installation of Matrix Synapse.
|
2018-11-13 01:11:47 +00:00
|
|
|
(don't forget to import your `media_store` files as well - see [the restoring media store guide](restoring-media-store.md)).
|
2018-08-08 07:07:02 +00:00
|
|
|
|
|
|
|
While this playbook always sets up PostgreSQL, by default a Matrix Synapse installation would run
|
|
|
|
using an SQLite database.
|
|
|
|
|
|
|
|
If you have such a Matrix Synapse setup and wish to migrate it here (and over to PostgreSQL), this command is for you.
|
|
|
|
|
|
|
|
|
2019-01-01 13:16:13 +00:00
|
|
|
## Prerequisites
|
2018-08-08 07:07:02 +00:00
|
|
|
|
2019-01-01 13:35:33 +00:00
|
|
|
Before doing the actual import, **you need to upload your SQLite database file to the server** (any path is okay).
|
2019-01-01 13:16:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Importing
|
|
|
|
|
|
|
|
Run this command (make sure to replace `<server-path-to-homeserver.db>` with a file path on your server):
|
|
|
|
|
|
|
|
ansible-playbook -i inventory/hosts setup.yml --extra-vars='server_path_homeserver_db=<server-path-to-homeserver.db>' --tags=import-sqlite-db
|
|
|
|
|
|
|
|
**Note**: `<server-path-to-homeserver.db>` must be a file path to a `homeserver.db` file on the server (not on your local machine!).
|