From 88eabfa707b53c417baeab31718918159a5fc27c Mon Sep 17 00:00:00 2001 From: Jizhou Deng Date: Thu, 11 Dec 2025 17:52:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.update=20seafile=20cluster=20from=2012=20?= =?UTF-8?q?to=2013=EF=BC=9B=202.optimize=20the=20Seafile=2013.0=20binary?= =?UTF-8?q?=20upgrade=20documentation=EF=BC=9B=203.fix=20some=20errors=20i?= =?UTF-8?q?n=2013.0=20cluster=20deployment=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manual/setup_binary/cluster_deployment.md | 4 +- manual/upgrade/upgrade_a_cluster_binary.md | 66 ++++++++++++++++++++-- manual/upgrade/upgrade_notes_for_13.0.x.md | 30 ++++++++-- 3 files changed, 90 insertions(+), 10 deletions(-) diff --git a/manual/setup_binary/cluster_deployment.md b/manual/setup_binary/cluster_deployment.md index 581d70ca..d76c1cf5 100644 --- a/manual/setup_binary/cluster_deployment.md +++ b/manual/setup_binary/cluster_deployment.md @@ -388,7 +388,9 @@ Refer to [AWS documentation](http://docs.aws.amazon.com/elasticloadbalancing/lat proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - http_502 http_503 http_504; + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; + proxy_next_upstream_tries 3; + client_max_body_size 0; } } ``` diff --git a/manual/upgrade/upgrade_a_cluster_binary.md b/manual/upgrade/upgrade_a_cluster_binary.md index fa015196..9f2483fa 100644 --- a/manual/upgrade/upgrade_a_cluster_binary.md +++ b/manual/upgrade/upgrade_a_cluster_binary.md @@ -1,7 +1,3 @@ ---- -status: new ---- - # Upgrade a Seafile cluster (binary) ## Major and minor version upgrade @@ -24,6 +20,68 @@ In general, to upgrade a cluster, you need: Doing maintanence upgrading is simple, you only need to run the script `./upgrade/minor_upgrade.sh` at each node to update the symbolic link. +## Upgrade a cluster from Seafile 12 to 13 + +!!! tip "Clean Database" + If you have a large number of `Activity` in MySQL, clear this table first [Clean Database](../../administration/clean_database). Otherwise, the database upgrade will take a long time. + +1. Stop Seafile server + + !!! note + For installations using python virtual environment, activate it if it isn't already active + + ```sh + source python-venv/bin/activate + ``` + + === "Frontend node" + ```sh + cd /opt/seafile/seafile-server-latest + su seafile + ./seafile.sh stop + ./seahub.sh stop + ``` + === "Backend node" + ```sh + cd /opt/seafile/seafile-server-latest + su seafile + ./seafile.sh stop + ./seafile-background-tasks.sh stop + ``` + +2. Install [new Python libraries](./upgrade_notes_for_13.0.x.md#new-python-libraries) + +3. [Download](../setup_binary/installation.md#downloading-the-install-package) and [uncompress](../setup_binary/installation.md#uncompressing-the-package) the package + +4. Run the upgrade script in a single node + + ```sh + seafile-pro-server-13.x.x/upgrade/upgrade_12.0_13.0.sh + ``` + +5. Follow [here](./upgrade_notes_for_13.0.x.md#5-modify-the-env-file-in-conf-directory) to modify the `.env` file in `conf/` directory + +6. Start Seafile server + + === "Frontend node" + ```sh + cd /opt/seafile/seafile-server-latest + su seafile + ./seafile.sh start + ./seahub.sh start + ``` + === "Backend node" + ```sh + cd /opt/seafile/seafile-server-latest + su seafile + ./seafile.sh start + ./seafile-background-tasks.sh start + ``` + +7. (Optional) Refer [here](./upgrade_notes_for_13.0.x.md#8-optional-upgrade-notification-server) to upgrade notification server + +8. (Optional) Refer [here](./upgrade_notes_for_13.0.x.md#9-optional-upgrade-seadoc-from-10-to-20) to upgrade SeaDoc server + ## Upgrade a cluster from Seafile 11 to 12 !!! tip "Clean Database" diff --git a/manual/upgrade/upgrade_notes_for_13.0.x.md b/manual/upgrade/upgrade_notes_for_13.0.x.md index 274c7fcf..7eace741 100644 --- a/manual/upgrade/upgrade_notes_for_13.0.x.md +++ b/manual/upgrade/upgrade_notes_for_13.0.x.md @@ -42,12 +42,12 @@ Elasticsearch version is not changed in Seafile version 13.0 === "Ubuntu 24.04/22.04" ```sh - apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmysqlclient-dev memcached libmemcached-dev redis-server libhiredis-dev ldap-utils libldap2-dev python3.12-venv default-libmysqlclient-dev build-essential pkg-config + apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmysqlclient-dev ldap-utils libldap2-dev python3.12-venv default-libmysqlclient-dev build-essential pkg-config ``` === "Debian 12/13" ```sh - apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmariadb-dev-compat memcached libmemcached-dev redis-server libhiredis-dev ldap-utils libldap2-dev libsasl2-dev pkg-config python3.13-venv + apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmariadb-dev-compat ldap-utils libldap2-dev libsasl2-dev pkg-config python3.13-venv ``` @@ -156,7 +156,27 @@ MEMCACHED_PORT=11211 pwgen -s 40 1 ``` -### 6) Start Seafile-13.0.x server +### 6) Remove obsolete configurations + +Although the configurations in environment (i.e., `.env`) have higher priority than the configurations in config files, we recommend that you remove or modify the cache configuration in the following files to avoid ambiguity: + +1. Backup the old configuration files: + + ```sh + # please replace /opt/seafile-data to your $SEAFILE_VOLUME + + cp /opt/seafile/conf/seafile.conf /opt/seafile/conf/seafile.conf.bak + cp /opt/seafile/conf/seahub_settings.py /opt/seafile/conf/seahub_settings.py.bak + ``` + +2. Clean up redundant configuration items in the configuration files: + + - Open `/opt/seafile/conf/seafile.conf` and remove the entire `[memcached]`, `[database]`, `[commit_object_backend]`, `[fs_object_backend]`, `[notification]` and `[block_backend]` if above sections have correctly specified in `.env`. + - Open `/opt/seafile/conf/seahub_settings.py` and remove the entire blocks for `DATABASES = {...}` and `CAHCES = {...}` + + In the most cases, the `seafile.conf` only include the listen port `8082` of Seafile file server. + +### 7) Start Seafile-13.0.x server In the folder of Seafile 13.0.x, run the command: @@ -165,7 +185,7 @@ In the folder of Seafile 13.0.x, run the command: ./seahub.sh start # starts seahub ``` -### 7) (Optional) Upgrade notification server +### 8) (Optional) Upgrade notification server Since seafile 12.0, we use docker to deploy the notification server. Please follow the document of [notification server](../extension/notification-server.md) to re-deploy notification server. @@ -173,7 +193,7 @@ Since seafile 12.0, we use docker to deploy the notification server. Please foll Notification server is designed to be work with Docker based deployment. To make it work with **Seafile binary package** on the same server, you will need to add Nginx rules for notification server properly. -### 8) (Optional) Upgrade SeaDoc from 1.0 to 2.0 +### 9) (Optional) Upgrade SeaDoc from 1.0 to 2.0 Since seafile 12.0, we use docker to deploy the seadoc server. Please see the document [Setup SeaDoc](../extension/setup_seadoc.md) to install SeaDoc on a separate machine and integrate with your binary packaged based Seafile server v13.0. From 5dd41be1c43bef68785a36fb8eecefda247e45a7 Mon Sep 17 00:00:00 2001 From: Jizhou Deng Date: Fri, 12 Dec 2025 14:00:05 +0800 Subject: [PATCH 2/2] fix some errors. --- manual/upgrade/upgrade_a_cluster_binary.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/manual/upgrade/upgrade_a_cluster_binary.md b/manual/upgrade/upgrade_a_cluster_binary.md index 9f2483fa..e8c6fc20 100644 --- a/manual/upgrade/upgrade_a_cluster_binary.md +++ b/manual/upgrade/upgrade_a_cluster_binary.md @@ -22,9 +22,6 @@ Doing maintanence upgrading is simple, you only need to run the script `./upgrad ## Upgrade a cluster from Seafile 12 to 13 -!!! tip "Clean Database" - If you have a large number of `Activity` in MySQL, clear this table first [Clean Database](../../administration/clean_database). Otherwise, the database upgrade will take a long time. - 1. Stop Seafile server !!! note