ZarafaをKopanoにアップグレードしてから半年が経過した。
アップグレードでデータベースの更新を間違ったらしく、メモがおかしなことになってしまったが、被害はそれほど大きくなく、手作業でどうにかできたのだが…
最近、ちょこちょことメモ機能を使うようになったので、こうしたトラブルが発生しないようにこまめにバージョンアップをしようという気になった。
失敗に備えて、ESXiでスナップショットをとっておく。これで、失敗してもすぐに戻ることができる。手順の途中にもバックアップがあるけど、スルーしてしまえ。
必要なモジュールをコミュニティのダウンロードからダウンロードする。coreとwebapp。webmeetingsにも興味があるけど…。
手順はマニュアルに書かれている。以下は、そこから必要と思ったことを実施したものなので、ご参考。
まず、MTA(Mail Transfer Agent)を止める。$ sudo service postfix stop
続いて、Kopanoを止める。$ sudo service kopano-spooler stop
$ sudo service kopano-server stop
$ sudo service kopano-dagent stop
$ sudo service kopano-gateway stop
$ sudo service kopano-ical stop
$ sudo service kopano-search stop
$ sudo service kopano-monitor stop
前回ちゃんと設定していなかったが、改めて見ると添付ファイルはデータベースではなく、ディレクトリに置かれるようになっていた。
/etc/kopano/server.cfg# Where to place attachments. Value can be 'database', 'files' or 's3'
attachment_storage = files
# Enable fsync as method to make sure attachments are stored on disk where
# supported and will not be buffered by OS and/or filesystem. Please note
# this setting will lower attachment write performance depending on your
# environment but enhances data safety with disaster recovery.
# Only affects 'files' attachment storage backend.
attachment_files_fsync = yes
# When attachment_storage is 'files', use this path to store the files
# When attachment_storage is 's3', use this path to set a prefix to all
# attachment data of a certain cluster, for example 'attach'
attachment_path = /var/lib/kopano/attachments
# Compression level for attachments when attachment_storage is 'files'.
# Set compression level for attachments disabled=0, max=9
attachment_compression = 6
うーむ。perl db-convert-attachments-to-files mysqluser mysqlpassword mysqldatabase \
path_to_filesystem [delete]
と書かれているので…$ sudo apt install libdbi-perl libdbd-mysql-perl←スクリプトが利用するDatabase interfaceライブラリ
$ cd /usr/share/doc/kopano
$ sudo perl db-convert-attachments-to-files postmaster *postmaster-password* kopano /var/lib/kopano/attachments [delete]
$ sudo kopano-server --ignore-attachment-storage-conflict
復活しなかった。でも、古いファイルの添付は使ってない。
本気で必要な場合には取り組まなければ…なんだろうけど、割り切り。
バックアップ手順を飛ばして…
まずは、ファイルを展開。$ tar zxvf core-*
$ tar zxvf webapp-*
次に、展開したディレクトリに行ってパッケージをインストール。
この日に落としてきたのは8.4.90だった。$ sudo dpkg -i *
とにかく依存関係の問題が発生しなくなるまで、時々-Bi オプションでインストールを続ける。
今回は、/etc/kopano/server.confが大幅に変わったらしいので、中身をそっくり入れ替え。# If a directive is not used (i.e. commented out), the built-in server default
# is used, so to disable certain features, the empty sring value must explicitly be
# set on them.
・
・
・
# e-mail address of the Kopano System user
system_email_address = webmaster@hogeserver.hogeddns.jp
・
・
・
# The user under which we connect with MySQL
mysql_user = postmaster
# The password for the user (leave empty for no password)
mysql_password = *postmasterのパスワード*
・
・
・
##############################################################
# SSL SETTINGS
server_ssl_enabled = no ←追加
# Space-separated list of address:port specifiers for where to listen for
今回は、かなりserver.confの中身が変わっていたものの、実際に設定を加えた箇所はこれだけで動いた。一度ちゃんと設定さえしてしまえば、その後のメンテナンスにはそれほど工数がかからないんだなーと改めて気付いた。
サーバーを起動。$ sudo service kopano-spooler start
$ sudo service kopano-server start
$ sudo service kopano-dagent start
$ sudo service kopano-gateway start
$ sudo service kopano-ical start
$ sudo service kopano-search start
$ sudo service kopano-monitor start
動作確認後、ESXiのスナップショットを削除(統合)して作業完了。
↧
Kopano アップグレード
↧