summaryrefslogtreecommitdiffstatshomepage
path: root/docs/usage/admin.rst
blob: 5fe2e904f9d1c224294df8dea774d11d9f556185 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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.