成功遷移seafile

呼…用咗唔少時間…之前一直怯,不過呢家總算都有番service。

最恐怖就係我以為seafile話得30G嘢就真係得30G,卻冇諗過背後有一大堆journal同backup keep住,真正overall transfer咗嘅seafile-data size係190G。好彩係我一個人用,如果係一team人用,數據量可能段TB計。

此時此刻有幾個問題:

  1. 本身個source server個host嘅arch係x86,destination server係arm64,有無compatible build?
    • 呢個確實有,係俾RPi 2+用,但我Rock64試過亦都可以直接用
    • 可惜用嘅係armhf,而唔係native arm64(姐係i386同amd64嘅分別),速度點都會有啲慢
    • Destination Host用Debian 8,ayufan-rock64已經default enable kernel arm32支持,如果你用custom kernel嘅請自行打開,除此之外都無咩大礙
    • ./seafile.sh start顯示失去libselinux:
      [email protected]:~/seafile-server-6.2.5$ ./seafile.sh start
      /home/seafile/seafile-server-6.2.5/seafile/bin/seafile-controller: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
      
    • 解決方法: 增加armhf arch並download libselinux1:armhf
      # dpkg --add-architecture armhf
      # apt-get update
      ...
      # apt-get install libselinux1:armhf -y
      
  2. 點樣reset個configuration?
    • 抄走ccnet/, conf/, seahub-data/seahub.db (之後轉mysql)
    • 更改ccnet/seafile.ini (搵seafile-data嘅location), conf/*.(conf|py)並刪除conf/seahub_settings.pyc
  3. 本身同時都用咗nginx做fastcgi redirection,之後俾Cloudflare照住,但係呢家port 80俾個blog佔咗
    • 一唔係係nginx rewrite seahub嘅subdomain
      • 可行,但係同Wordpress會有衝突
    • 最後惟有放棄cloudflare
      • 反正我本身想用CF做acceleration,本身個source server係係台灣我嫌慢
      • 我個Rock64有gigabit🤷‍♂️

開啟seafile:

[email protected]:~/seafile-server-6.2.5$ ./seafile.sh start

[07/10/18 20:26:13] ../common/session.c(132): using config file /home/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started

Done.

[email protected]:~/seafile-server-6.2.5$ ./seahub.sh start

LANG is not set in ENV, set to en_US.UTF-8
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...

Seahub is started

Done.

連入nas:8000,成功! 😄

用原本AC可以login,所有文件齊全。Seafile client完全可以Sync。之後去admin panel更改埋db internal address即可,如果唔係web interface會down/up唔到file,同時,記得set番seafile嘅systemctl service呀。😉

跟住落嚟就係要configure Plex了。。。真正榨乾Rock64機能😏

題外話:本身用咗sqlite都可以話係不幸中嘅大幸🙃如果唔係ysql migration有排搞




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.