summaryrefslogtreecommitdiffstatshomepage
path: root/docs/usage/admin.rst
diff options
context:
space:
mode:
authorWolfgang Müller2024-03-05 18:08:09 +0100
committerWolfgang Müller2024-03-05 19:25:59 +0100
commitd1d654ebac2d51e3841675faeb56480e440f622f (patch)
tree56ef123c1a15a10dfd90836e4038e27efde950c6 /docs/usage/admin.rst
downloadhircine-0.1.0.tar.gz
Initial commit0.1.0
Diffstat (limited to 'docs/usage/admin.rst')
-rw-r--r--docs/usage/admin.rst58
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/usage/admin.rst b/docs/usage/admin.rst
new file mode 100644
index 0000000..5fe2e90
--- /dev/null
+++ b/docs/usage/admin.rst
@@ -0,0 +1,58 @@
+Administrative tasks
+====================
+
+Administrative tasks are handled by the command-line interface. To get a quick
+overview of available commands, run:
+
+.. code-block:: console
+
+ $ hircine -h
+
+Updating the application
+------------------------
+
+To update **hircine**, download the newest wheel and install it in the virtual
+environment:
+
+.. code-block:: console
+
+ $ source <VENVDIR>/bin/activate
+ (.venv) $ python -m pip install <WHEEL>
+
+Running database migrations
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+After the update it might be required to bring the database up-to-date. To do
+this, run:
+
+.. code-block:: console
+
+ $ hircine migrate
+
+A backup will be created automatically.
+
+Backing up the database
+-----------------------
+
+To save a current backup of the database into the ``backup/`` directory, run:
+
+.. code-block:: console
+
+ $ hircine backup
+
+To restore a previously saved backup, stop **hircine** and simply replace the
+``hircine.db`` file with the backup.
+
+Optimizing the database
+-----------------------
+
+To optimize the SQLite database, run:
+
+.. code-block:: console
+
+ $ hircine vacuum
+
+This is generally only recommended after deleting a large amount of data. Refer
+to the `SQLite documentation
+<https://www.sqlite.org/lang_vacuum.html#description>`_ for details on this
+process.