Seafile is an open-source cloud solution and on a BeagleBone or Raspberry a really good alternative to OwnCloud (see the article OwnCloud alternative with Seafile and Baikal ).
Seafile is now running on my BeagleBone Black for a few months and I must say that it is working very reliable since now. Meanwhile, around 600 GB of data are in the cloud and I have found no problems yet.
Now for the first time an update needs to done due to version 3.1.4 and it has really paid off: server and client start much faster and they are also synchronized much faster. So really a real benefit.
Here are the steps to perform the update. The version numbers and the path to Seafile installation of course may differ.
Step 1
Stop Seafile and become Seafile-User. When installing Seafile it is recommended to create a separate user to run Seafile-Server. This prevents, that Seafile works with root privileges.
The following steps should now be done with the privileges of Seafile-user so that file and directory rights are correctly set after the upgrade. But this is not necessarily mandatory (see last step).
sudo su - Seafile-User
Step 2
In any case, first save the old installation!
cp -r /home/seafile /home/bup_seafile
If you now go into the seafile directory and make a listing it should look like this:
root@arm:/home/seafile# ls -l insgesamt 36 drwx------ 3 seafile seafile 4096 Jul 7 13:27 ccnet drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:05 conf drwxr-xr-x 2 seafile seafile 4096 Jul 7 12:59 installed drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:39 logs drwxr-xr-x 2 seafile seafile 4096 Aug 20 15:23 pids drwxr-xr-x 6 seafile seafile 4096 Jun 8 01:09 seafile-server-3.0.4 lrwxrwxrwx 1 seafile seafile 20 Jul 7 13:06 seafile-server-latest -> seafile-server-3.0.4 drwxr-xr-x 3 seafile seafile 4096 Jul 7 13:06 seahub-data -rw-r--r-- 1 seafile seafile 436 Jul 7 13:27 seahub_settings.py -rw-r--r-- 1 seafile seafile 631 Jul 7 13:35 seahub_settings.pyc
(Note the symbolic link "seafile-server-latest", which points to the directory "seafile-server-3.0.4")
Step 3
Now download the new version into the directory and unpack it
wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_3.1.4_pi.tar.gz tar -zxvf seafile-server_3.1.4_pi.tar.gz
After that, the directory should look like this:
root@arm:/home/seafile# ls -l insgesamt 18424 drwx------ 3 seafile seafile 4096 Jul 7 13:27 ccnet drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:05 conf drwxr-xr-x 2 seafile seafile 4096 Jul 7 12:59 installed drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:39 logs drwxr-xr-x 2 seafile seafile 4096 Aug 20 15:23 pids drwxr-xr-x 6 seafile seafile 4096 Jun 8 01:09 seafile-server-3.0.4 drwxr-xr-x 6 seafile seafile 4096 Aug 27 18:52 seafile-server-3.1.4 -rw-rw-r-- 1 seafile seafile 18824635 Sep 4 09:11 seafile-server_3.1.4_pi.tar.gz lrwxrwxrwx 1 seafile seafile 20 Jul 7 13:06 seafile-server-latest -> seafile-server-3.0.4 drwxr-xr-x 3 seafile seafile 4096 Jul 7 13:06 seahub-data -rw-r--r-- 1 seafile seafile 436 Jul 7 13:27 seahub_settings.py -rw-r--r-- 1 seafile seafile 631 Jul 7 13:35 seahub_settings.pyc
Now you can delete the downloaded archive.
rm seafile-server_3.1.4_pi.tar.gz
Step 4
Now perform the upgrade.
To do this, go into the upgrade directory
root@arm:/home/seafile# cd seafile-server-3.1.4/upgrade root@arm:/home/seafile/seafile-server-3.1.4/upgrade# ls -l insgesamt 104 -rwxr-xr-x 1 seafile seafile 4735 Feb 24 2014 add_collate.sh -rw-r--r-- 1 seafile seafile 1369 Feb 24 2014 db_update_1.3_1.4.py -rw-r--r-- 1 seafile seafile 9652 Feb 24 2014 db_update_helper.py -rwxr-xr-x 1 seafile seafile 3183 Mai 21 16:11 minor-upgrade.sh drwxr-xr-x 10 seafile seafile 4096 Aug 1 04:57 sql -rwxr-xr-x 1 seafile seafile 3888 Feb 24 2014 upgrade_1.2_1.3.sh -rwxr-xr-x 1 seafile seafile 3816 Feb 24 2014 upgrade_1.3_1.4.sh -rwxr-xr-x 1 seafile seafile 3527 Feb 24 2014 upgrade_1.4_1.5.sh -rwxr-xr-x 1 seafile seafile 3864 Feb 24 2014 upgrade_1.5_1.6.sh -rwxr-xr-x 1 seafile seafile 4289 Feb 24 2014 upgrade_1.6_1.7.sh -rwxr-xr-x 1 seafile seafile 4076 Feb 24 2014 upgrade_1.7_1.8.sh -rwxr-xr-x 1 seafile seafile 4294 Feb 24 2014 upgrade_1.8_2.0.sh -rwxr-xr-x 1 seafile seafile 6148 Mai 21 16:11 upgrade_2.0_2.1.sh -rwxr-xr-x 1 seafile seafile 5412 Mai 21 16:11 upgrade_2.1_2.2.sh -rwxr-xr-x 1 seafile seafile 6087 Aug 18 12:06 upgrade_2.2_3.0.sh -rwxr-xr-x 1 seafile seafile 5511 Aug 1 04:57 upgrade_3.0_3.1.sh drwxr-xr-x 3 seafile seafile 4096 Aug 18 10:04 win32
In this case the script "upgrade_3.0_3.1.sh" must be used.
Important
If you have missed a few updates, and you go from version 2.x or even from version 1.x, you must run all intermediate scripts from your Version on.
If you upgrade from version 3.1.2 to version 3.1.4, only the script "minor-upgrade.sh" must be performed.
The output of the script should look like this:
root@arm:/home/seafile/seafile-server-3.1.4/upgrade# ./upgrade_3.0_3.1.sh ------------------------------------------------------------- This script would upgrade your seafile server from 3.0 to 3.1 Press [ENTER] to contiune ------------------------------------------------------------- migrating avatars ... Done Updating seafile/seahub database ... [INFO] You are using MySQL [INFO] updating seahub database... Done updating /home/seafile/seafile-server-latest symbolic link to /home/seafile/seafile-server-3.1.4 ... ----------------------------------------------------------------- Upgraded your seafile server successfully. ----------------------------------------------------------------- root@arm:/home/seafile/seafile-server-3.1.4/upgrade#
Again make a listing in the directory Seafile for safety:
root@arm:/home/seafile# ls -l insgesamt 40 drwx------ 3 seafile seafile 4096 Jul 7 13:27 ccnet drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:05 conf drwxr-xr-x 2 seafile seafile 4096 Jul 7 12:59 installed drwxr-xr-x 2 seafile seafile 4096 Jul 7 13:39 logs drwxr-xr-x 2 seafile seafile 4096 Sep 4 09:25 pids drwxr-xr-x 6 seafile seafile 4096 Jun 8 01:09 seafile-server-3.0.4 drwxr-xr-x 6 seafile seafile 4096 Aug 27 18:52 seafile-server-3.1.4 lrwxrwxrwx 1 seafile seafile 20 Sep 4 09:25 seafile-server-latest -> seafile-server-3.1.4 drwxr-xr-x 3 seafile seafile 4096 Jul 7 13:06 seahub-data -rw-r--r-- 1 seafile seafile 436 Jul 7 13:27 seahub_settings.py -rw-r--r-- 1 seafile seafile 631 Jul 7 13:35 seahub_settings.pyc
If the symbolic link "seafile-server-latest" points to the new directory "seafile-server-3.1.4", everything is fine and the update was successfull.
Now you can delete the directory of the old version.
rm -r seafile-server-3.0.4
Step 5
If the update was not done while logged in as the above-mentioned Seafile-User, the file and directory permissions must be corrected now. For this purpose, run the command
chown -R Seafile-User:Seafile-User /home/seafile
Add comment