wikiを引っ越し
apostrophe で運用している wiki を wplj に引っ越す。 参考ページ:
cf. wikiの引越し - blog.panicblanket.com
データのバックアップ
バックアップというか、apostrophe の wiki のデータを吐き出させる。データベースのデータは mysqldump コマンドで、画像などのデータは tar コマンドで固める。
takatoh@wplj $ ssh takatoh@apostrophe
takatoh@apostrophe's password:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-110-generic x86_64)
* Documentation: https://help.ubuntu.com/
New release '16.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Sat Feb 25 17:14:03 2017 from wplj
takatoh@apostrophe $ mysqldump -u root -p wiki > wiki.sql
Enter password:
takatoh@apostrophe $ cd /var/www/html/wiki
takatoh@apostrophe $ sudo tar czf images.tar.gz images
takatoh@apostrophe $ cp images.tar.gz /home/takatoh
takatoh@apostrophe $ exit
ログアウト
Connection to apostrophe closed.
データの移動
apostrophe から wplj へ移動。scp コマンド使用。
takatoh@wplj $ scp takatoh@apostrophe:wiki.sql .
takatoh@apostrophe's password:
wiki.sql 100% 20MB 20.5MB/s 00:01
takatoh@wplj $ scp takatoh@apostrophe:images.tar.gz .
takatoh@apostrophe's password:
images.tar.gz 100% 326MB 81.4MB/s 00:04
データベースへの読み込みとimagesの展開
takatoh@wplj $ mysql -u root -p wiki < wiki.sql
Enter password:
takatoh@wplj $ cd /var/www/html/wiki
takatoh@wplj $ sudo cp /home/takatoh/images.tar.gz .
[sudo] takatoh のパスワード:
takatoh@wplj $ ls
COPYING autoload.php maintenance
CREDITS cache mw-config
FAQ composer.json opensearch_desc.php
Gemfile.lock composer.local.json-sample phpcs.xml
Gruntfile.js docs profileinfo.php
HISTORY extensions resources
INSTALL images serialized
LocalSettings.php images.tar.gz skins
README img_auth.php tests
RELEASE-NOTES-1.27 includes thumb.php
Rakefile index.php thumb_handler.php
StartProfiler.sample jsduck.json vendor
UPGRADE languages wiki.phtml
api.php load.php
takatoh@wplj $ sudo tar xzf images.tar.gz
takatoh@wplj $ sudo chown -R www-data:www-data images
これで完了。ブラウザでアクセスすると、ちゃんと表示された。 今回は、前回の引っ越しの時のように、MediwWiki のインストールやり直しみたいな事にはならなかった。 これでしばらく様子を見よう。
