From 48e097246c5ca58f875cea50ccab5af46b50a252 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Tue, 13 Jul 2021 17:23:16 +0200 Subject: [PATCH] add readme.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e4bcb9c --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# 🧰 Conduit Toolbox 🦀 + +Helper tools for [Conduit](https://conduit.rs), a matrix homeserver in rust. + +This repository provides binaries to wrangle your conduit homeserver with. + +## Tools + +### `conduit_sled_to_sqlite` + +A one-shot migration tool to convert your sled database to a sqlite one; + +Instructions: (read the notes below first) +1. execute `conduit_sled_to_sqlite ` + - `conduit_sled_to_sqlite /var/lib/matrix-conduit/conduit_db` +2. the console will be spammed with a bunch of numbers, this is for diagnostic purposes, when the command returns, your database has been converted. + +Some notes: +- The conversion process can take a second depending on the speed of the disk of your server, on raspberry pis it could take a while. +- **Have your server turned off** throughout the conversion process, be sure it is updated to a version which uses SQLite as the main database, and only then turn it back on + - If you have the server be on during the conversion process, some data might be missing from the new database + - If you turn the server back on with an older version (which still uses sled), it'll create a brand new sled database in the database directory, which might be confusing. +- The above method places the new database in the same directory as the old one, this'll effectively duplicate your database, if you're sure your server is up-to-date and works with the new database, you can remove the old sled database files under that directory (be sure you have a backup first!); + - `blobs/` + - `db` + - `conf` +- The new database can be anywhere from 2 to 4 times bigger than the old database, if you want to know how much your current database size is, run the following command; + - `du --apparent-size --max-depth=0 -h ` + - And if you want to know how much room you have on your disk, you can run this; + - `df -h /` (with that trailing slash) + - Make sure you have this disk-space *extra* on your machine, else the conversion process will fill it up. + +## Installing + +For the best experience, compile this toolbox locally on your server; + +1. Download and install rust, see [rustup](https://rustup.rs/) for more. +2. Be sure that the rust executables are on your `$PATH` +3. `cargo install --locked --git https://github.com/shadowjonathan/conduit_toolbox` +