Akonadi/Postgres update/uk: Difference between revisions

From KDE UserBase Wiki
(Created page with "== Додаткові відомості ==")
(Created page with "* [https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL Оновлення PostgreSQL] (Вікі Arch linux) * [https://www.postgresql.org/docs/current/pgupgra...")
Line 40: Line 40:
== Додаткові відомості ==
== Додаткові відомості ==


* [https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL Upgrading PostgreSQL] (Arch linux wiki)
* [https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL Оновлення PostgreSQL] (Вікі Arch linux)
* [https://www.postgresql.org/docs/current/pgupgrade.html Upgrading PostgreSQL] (Official PostgreSQL documentation)
* [https://www.postgresql.org/docs/current/pgupgrade.htmОновлення PostgreSQL] (Офіційна документація з PostgreSQL)

Revision as of 13:39, 15 March 2019

Other languages:

This guide describes the steps to follow in order to upgrade your Akonadi database when using the PostgreSQL backend.

In order to use this guide, you need to have both the old and new PostgreSQL versions installed. The applications paths mentioned below are valid for openSUSE users. You may have to adapt these paths for your distribution.

The initdb and pg_upgrade tools are required. Make sure these applications are available before following this guide.

Зупиніть роботу служб Akonadi

akonadictl stop

(дочекайтеся завершення роботи усіх процесів akonadi)

Створіть додаткову резервну копію

cp -R $HOME/.local/share/akonadi/db_data $HOME/.local/share/akonadi/db_data_10

Перейменуйте каталог бази даних Akonadi

mv $HOME/.local/share/akonadi/db_data $HOME/.local/share/akonadi/db_data_old

Створіть нову базу даних за допомогою виконуваного файла postgreSQL 11

/usr/lib/postgresql11/bin/initdb --pgdata=$HOME/.local/share/akonadi/db_data --locale=en_US.UTF-8

Попередження

НЕ змінюйте значення --locale.


Перевіте, чи безпечним є оновлення

/usr/lib/postgresql11/bin/pg_upgrade -b /usr/lib/postgresql10/bin -B /usr/lib/postgresql11/bin -d $HOME/.local/share/akonadi/db_data_old -D $HOME/.local/share/akonadi/db_data --check

For more details about this command, you may read the pg_upgrade documentation.

If pg_upgrade doesn't detect any problem, you can start the database upgrade

/usr/lib/postgresql11/bin/pg_upgrade -b /usr/lib/postgresql10/bin -B /usr/lib/postgresql11/bin -d $HOME/.local/share/akonadi/db_data_old -D $HOME/.local/share/akonadi/db_data

Нарешті, запустіть akonadi

akonadictl start

і виконайте перевіку узгодженості

akonadictl fsck

After checking that your applications work as usual, you may delete the two backup copies you created earlier.

Додаткові відомості