I see no reason “seaf-gc.sh” should not process when invoked by “root”. I use “cron” to invoke “seaf-fsck.sh” to Export my Libraries for Backup. It must run as “root” and does run as “root”! But, “seaf-gc.sh” simply fails when invoked by “root”. I would really like to be able to delete unused blocks at the same time but can’t. CORRECTION: “seaf-fsck.sh” also fails when invoked by “root” so is consistent with “seaf-gc.sh”. END CORRECTION
By the way, …DIRECTORY-date +"%Y-%m-%d%H-%M-%S"… (This forum won’t accept the exact syntax so look it up!) works in the “seaf-fsck.sh” script exactly like in the “CP Command” which is really nice! You may want to consider updating your documentation so everyone knows.
The “cron” script: Stops the Seafile Server (systemctl), Mounts the “Vault” Partition (mount), … invokes “seaf-fsck.sh” to Backup the Seafile Libraries … , Unmounts the “Vault” Partition (umount) and Starts the Seafile Server (systemctl). On my systems, only “root” can issue mount/umount for the “Vault” Partition which contains the critical Backups.
So much for my ability as a tester: It WORKS! It would be nice if the Seafile Server documentation was updated to reflect this useful little trick. Now, I only need the one “cron” script for “root”. Thank you Bernie_O for the suggestion. CORRECTION: This little trick is also needed for “seaf-fsck.sh” when invoked by a “cron” script running as “root”. Sorry for any confusion I created. END CORRECTION
You can specify the thread number in with “-t” option. “-t” option can be used together with all other options. Each thread will do GC on one library. For example, the following command will use 20 threads to GC all libraries: