aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2021-09-27 16:34:35 +0200
committerpukkamustard <pukkamustard@posteo.net>2021-09-27 16:46:08 +0200
commit7e59a14a7282bd3223b4baae3e27a60d048e62d2 (patch)
tree3dcc41990a49d67db3a0fe7df7308e9d49e483c1
parent583b483f3adfa7320aae66990ca6635e3f29cf84 (diff)
warli: Fix non-persistent sqlite databse issue and add notes on how to backupHEADmain
-rw-r--r--machines/warli/README.org31
1 files changed, 30 insertions, 1 deletions
diff --git a/machines/warli/README.org b/machines/warli/README.org
index e65f1f5..d6d66d4 100644
--- a/machines/warli/README.org
+++ b/machines/warli/README.org
@@ -254,7 +254,6 @@ Also requires setting up a service endpoint (port 5347) in ejabberd.yml.
biboumi uses a sqlite database at ~/var/lib/biboumi/biboumi.sqlite~.
-** TODO Backup
** Wireguard
*** Installation
@@ -345,6 +344,30 @@ The password can be generated with ~slappasswd~
https://tylersguides.com/guides/how-to-change-an-openldap-password/
+** Backup
+
+#+BEGIN_SRC shell
+
+ sudo mkdir backup-YYMMDD
+ sudo ejabberdctl dump_config ejabberd.yml
+ sudo mv /var/lib/ejabberd/ejabberd.yml .
+ sudo cp /var/lib/ejabberd/sqlite3.db .
+
+ sudo cp /etc/biboumi/biboumi.cfg .
+
+ slapcat -n 0 -l config.ldf
+ slapcat -n 1 -l data.ldif
+
+ cd ..
+ tar cfj backup-YYMMDD.tar.bz2 backup-YYMMDD/
+
+ gpg --recipient pukkamustard@posteo.net --encrypt backup-YYMMDD.tar.bz2
+
+ rm -rf backup-YYMMDD.tar.bz2 backup-YYMMDD/
+#+END_SRC
+
+Backup the GPG encrypted file to another host.
+
* Log
** [2021-04-13 Tue] Init
@@ -372,3 +395,9 @@ Installing wireguard required updating kernel which required a reboot. After reb
This seems to have been a caching issue. Ejabberd caches mostly everything an only occasionally dumps to db. I've set the option ~use_cache: false~ in the hope that this will now be persisted.
Inspecting the sqlite database manually shows that things do seem to be persisted. We should shedule another reboot to test this.
+
+** [2021-09-27 Mon] Fix non-persistent sqlite database
+
+The sqlite database was stored in `/var/run/ejabberd/sqlite.db`. `/var/run` is cleared on reboots...d'oh.
+
+Moved database to `/var/lib/ejabberd/sqlite.db`