From 368efe0568c7be6f3da3c07536953f45a76a144f Mon Sep 17 00:00:00 2001 From: Daniel Pan Date: Fri, 25 Oct 2024 11:24:52 +0800 Subject: [PATCH] Clean up document related to GC --- manual/administration/seafile_gc.md | 84 ------------------- ...angelog-for-seafile-professional-server.md | 7 ++ manual/setup/setup_ce_by_docker.md | 2 +- manual/setup/setup_pro_by_docker.md | 2 +- manual/upgrade/upgrade_notes_for_12.0.x.md | 1 + 5 files changed, 10 insertions(+), 86 deletions(-) diff --git a/manual/administration/seafile_gc.md b/manual/administration/seafile_gc.md index c2d4319e..975786bc 100644 --- a/manual/administration/seafile_gc.md +++ b/manual/administration/seafile_gc.md @@ -10,10 +10,6 @@ The GC program cleans up two types of unused blocks: 1. Blocks that no library references to, that is, the blocks belong to deleted libraries; 2. If you set history length limit on some libraries, the out-dated blocks in those libraries will also be removed. -**Before running GC, you must shutdown the Seafile program on your server if you use the community edition. For professional edition, online GC operation is supported. If you use Professional edition, you don't need to shutdown the Seafile program if you are using MySQL.** -This is because new blocks written into Seafile while GC is running may be mistakenly deleted by the GC program. - -At the bottom of the page there is a script that you can use to run the cleanup manually or e.g. once a week with as cronjob. ## Run GC @@ -130,86 +126,6 @@ seaf-gc.sh --id-prefix a123 ``` -## GC cleanup script for Community Version - -To use this script you need: - -* Setup the seafile-service file at '/etc/init.d/seafile-server' -* Files of seafile setup need to be owner by 'seafile:nogroup' or 'seafile:seafile' -* Run the script with sudo or as root -* Put the script into crontab of a root user - -Create the script file (change the location to your liking): - -``` -touch /opt/haiwen/seafile/cleanupScript.sh - -``` - -Use your favorite text editor and paste the following code: - -``` -#!/bin/bash - -##### -# Uncomment the following line if you rather want to run the script manually. -# Display usage if the script is not run as root user -# if [[ $USER != "root" ]]; then -# echo "This script must be run as root user!" -# exit 1 -# fi -# -# echo "Super User detected!!" -# read -p "Press [ENTER] to start the procedure, this will stop the seafile server!!" -##### - -# stop the server -echo Stopping the Seafile-Server... -systemctl stop seafile.service -systemctl stop seahub.service - -echo Giving the server some time to shut down properly.... -sleep 20 - -# run the cleanup -echo Seafile cleanup started... -sudo -u seafile $pathtoseafile/seafile-server-latest/seaf-gc.sh - -echo Giving the server some time.... -sleep 10 - -# start the server again -echo Starting the Seafile-Server... -systemctl start seafile.service -systemctl start seahub.service - -echo Seafile cleanup done! - -``` - -Make sure that the script has been given execution rights, to do that run this command. - -``` -sudo chmod +x /path/to/yourscript.sh - -``` - -Then open crontab with the root user - -``` -crontab -e - -``` - -Add the following line (change the location of your script accordingly!) - -``` -0 2 * * Sun /opt/haiwen/seafile/cleanupScript.sh - -``` - -The script will then run every Sunday at 2:00 AM. - ## GC in Seafile docker container diff --git a/manual/changelog/changelog-for-seafile-professional-server.md b/manual/changelog/changelog-for-seafile-professional-server.md index d270816f..97ffe8fe 100644 --- a/manual/changelog/changelog-for-seafile-professional-server.md +++ b/manual/changelog/changelog-for-seafile-professional-server.md @@ -165,6 +165,13 @@ Other changes Please check our document for how to upgrade to [10.0](../upgrade/upgrade_notes_for_10.0.x.md). + +### 10.0.17 (2024-10-23) + +This release is for Docker image only + +* [fix] Update the version of sqlalchemy to make "activities" page work. The bug was introduced in v10.0.16. + ### 10.0.16 (2024-06-21) * [fix] Fix CollaboraOnline integration for read-only shares and share links diff --git a/manual/setup/setup_ce_by_docker.md b/manual/setup/setup_ce_by_docker.md index eb3d09df..1a7c42e1 100644 --- a/manual/setup/setup_ce_by_docker.md +++ b/manual/setup/setup_ce_by_docker.md @@ -126,7 +126,7 @@ Follow the instructions in [Backup and restore for Seafile Docker](../administra When files are deleted, the blocks comprising those files are not immediately removed as there may be other files that reference those blocks (due to the magic of deduplication). To remove them, Seafile requires a ['garbage collection'](../administration/seafile_gc.md) process to be run, which detects which blocks no longer used and purges them. (**NOTE:** for technical reasons, the GC process does not guarantee that _every single_ orphan block will be deleted.) -The required scripts can be found in the `/scripts` folder of the docker container. To perform garbage collection, simply run `docker exec seafile /scripts/gc.sh`. For the community edition, this process will stop the seafile server, but it is a relatively quick process and the seafile server will start automatically once the process has finished. The Professional supports an online garbage collection. +The required scripts can be found in the `/scripts` folder of the docker container. To perform garbage collection, simply run `docker exec seafile /scripts/gc.sh`. ## FAQ diff --git a/manual/setup/setup_pro_by_docker.md b/manual/setup/setup_pro_by_docker.md index 52e189c4..b282473f 100644 --- a/manual/setup/setup_pro_by_docker.md +++ b/manual/setup/setup_pro_by_docker.md @@ -174,7 +174,7 @@ Follow the instructions in [Backup and restore for Seafile Docker](../administra When files are deleted, the blocks comprising those files are not immediately removed as there may be other files that reference those blocks (due to the magic of deduplication). To remove them, Seafile requires a ['garbage collection'](../administration/seafile_gc.md) process to be run, which detects which blocks no longer used and purges them. (NOTE: for technical reasons, the GC process does not guarantee that _every single_ orphan block will be deleted.) -The required scripts can be found in the `/scripts` folder of the docker container. To perform garbage collection, simply run `docker exec seafile /scripts/gc.sh`. For the community edition, this process will stop the seafile server, but it is a relatively quick process and the seafile server will start automatically once the process has finished. The Professional supports an online garbage collection. +The required scripts can be found in the `/scripts` folder of the docker container. To perform garbage collection, simply run `docker exec seafile /scripts/gc.sh`. ## FAQ diff --git a/manual/upgrade/upgrade_notes_for_12.0.x.md b/manual/upgrade/upgrade_notes_for_12.0.x.md index 3a78e485..28dc8660 100644 --- a/manual/upgrade/upgrade_notes_for_12.0.x.md +++ b/manual/upgrade/upgrade_notes_for_12.0.x.md @@ -17,6 +17,7 @@ Seafile version 12.0 has following major changes: * SeaDoc is now stable, providing online notes and documents feature * A new wiki module (still in beta, disabled by default) * A new trash mechanism, that deleted files will be recorded in database for fast listing. In the old version, deleted files are scanned from library history, which is slow. +* Community edition now also support online GC (because SQLite support is dropped) Other changes: