Is the professional version of this out yet? All I can see on the downloads page is 10.0.9.
It is not out yet. You can check the announcements category in the forum for release notices.
Hello! Have been using Seafile since Version 6 without issues, running with SQLite. Currently running version 10.
Are the conversion scripts for SQLite to MariaDB in the manual recent for version 10?
So that I can move to MariaDB and version 11?
I am worried to give it a try without confirmation that the scripts work, don’t want to crash my seafile installation (3 TB of data in there…).
Thanks for an update regarding this matter.
Ruediger
no they do not work properly, they have not been updated since they failed for me. See message somewhere above where they promised to look at it, which they unfortunately have not done
Can you please look at those scripts?
I guess I am not the only person still running a version with sqlite, and since V11 will not work with sqlite anymore, the conversion script is essential for users like me!
Otherwise I have to export all data, create a new seafile instance and re-import all data, a complete mess with several users and a total of 3TB of data…
Thanks a lot!!!
Kind regards,
Ruediger
Hello.
Based on our recent support experience on the forum and via emails, the migration scripts should work fine for most cases, but there might be some specific errors due to the user environment and the sqlite data. In this case, the customer needs to solve the problems one by one according to the error messages, or post the error message on the forum so that we can take a look at it together.
Please refer to this document Migrate From SQLite to MySQL - Seafile Admin Manual
This is probably because the value of the database field in sqlite is too long, exceeding the field length limit in the mysql table definition. So, please go to line 246 of seahub-db.sql, see what the specific statement is and post it here.
Please go to line 11956 of seahub-db.sql, see what the specific statement is and post it here.
You can create this table manually, the sql is here: seahub/sql/mysql.sql at v10.0.11-pro · haiwen/seahub · GitHub
Alternatively, maybe this error won’t be shown after the error errno: 150 “Foreign key constraint is incorrectly formed” is resolved.
Hello.
First of all, please backup your Seafile server before doing any migration.
Yes, the scripts can be used for version 10.
The migration process consists of two parts:
1, configure Seafile to use mysql database.
2, migrate the content in sqlite database to mysql database.
So if there is any problem during the migration, just change the Seafile configuration back to connect to sqlite database.
Hello!
So the conversion will not change anything in the seafile data folder but converts only the database, correct?
So I need to backup only the sqlite database? Not the entire seafile data folder?
take zfs snapshots as backups anyways, but I don’t need to restore them in case of problems, but only the sqlite files?
What’s a good way to disconnect seafile from the internet (and the seafile clients) to check within seahub that everything is fine before people start syncing again? Just disable the nginx configuration for seafile?
And access seahub directly using it’s port?
Kind regards,
Ruediger
No, the sqlite to mysql script will not change seafile-data.
Yes, only the sqlite database.
Yes.
Or, you can remove Seafile domain record from your DNS, then visit Seafile via IP for testing.
in the meantime I migrate to a new server, the shell script does throws an error as it seems to required python2 not the installed phython3, anyway it changed it to use python3 executable, it seems to work, the errors above still occur.
if the FK errors are due to a wrong order, I would have expected the migration script to create them in proper order. Or probably better the tables are created with the actuall new installation scripts, and then only the data is imported instead of create and import. Having to manually edit the script several times, during testing and during the actual migration, is prone to lead to errors.
the other errors:
ERROR 1406 (22001) at line 272 in file: ‘seahub-db.sql’: Data too long for column ‘token’ at row 1
INSERT INTO share_uploadlinkshare VALUES(4,‘XXXXXXXXXXX’,‘b30e929a-93e2-4254-86c5-7aa513893ac1’,‘/data/’,‘2014bb9e8b394c83b3ec’,‘2017-06-30 15:05:59.431456’, 8,‘pbkdf2_sha256$20000$fEOBZA2Z0MNq$oluLifq9sT0K6sZLfzrmPAKO9OUgqdgW2r5aK/eXHSg=’,NULL);
ERROR 1064 (42000) at line 12460 in file: ‘seahub-db.sql’: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ’ reporter text NOT NULL) ENGINE=INNODB’ at line 1
CREATE TABLE IF NOT EXISTS custom_share_permission (id integer NOT NULL PRIMARY KEY AUTO_INCREMENT AUTO_INCREMENT, repo_id varchar(36) NOT NULL, name varchar(255) NOT NULL, description varchar(500) NOT NULL, permission , reporter text NOT NULL) ENGINE=INNODB;
it seems the data type is missing for permission column
yes the missing tables seem to be related to the FK issues above
Is the professional version of this out yet?
Are there any plans to remove the requirement to install python dependencies with pip under the root account? Starting in Ubuntu 23.04. PIP has to be used in virtual environment (venv) and this is also affects Ubuntu 24.04 LTS.
Using venv under the seafile account would be a better solution handling python dependencies.
I’m actually disappointed in myself that I actually understood what you’re talking about
But yes, I went down learning all about Python and virtual instances to realise it didn’t work.
Installing with pip in a venv owned by the seafile account worked for me. There were basically 3 modifications to the deploy steps in the manual.
1 - Don’t sudo pip
2 - After unzipping the server files, make the venv, activate it, and do the pip install there
3 - Make a little wrapper script to call from the systemd unit files to activate the venv when running seafile programs.
I wrote up the process I used as modifications to the official deploy guide. See the new sections “For Seafile 11.0.x on Debian 12”, and “Create the python virtual environment and install dependencies with pip” in the “deploying with mysql” page seafile-admin-docs/manual/deploy/using_mysql.md at python-venv-on-deb12 · crowtrobot/seafile-admin-docs · GitHub .
and the section “Create the script to activate the python virtual environment” in the " Start Seafile at System Bootup" page at seafile-admin-docs/manual/deploy/start_seafile_at_system_bootup.md at python-venv-on-deb12 · crowtrobot/seafile-admin-docs · GitHub
In spite of the name of some of those sections I don’t think it is exclusive to Debian 12, that’s just what I tested on.
So I finally managed to setup mariadb properly and tried to import the SQL exports from SQLite.
ccnet db went through without errors.
Seafile db stopped at line 1264 showing (Error in query (1264): Out of range value for column ‘file_count’ at row 1).
Looking at the file with nano, line 1264 is actually empty, line 1263 and 1265 show:
Blockquote
INSERT INTO RepoTokenPeerInfo VALUES(‘a75371a4bf08c8d1f0b0d1aaf06bee665d30c47c’,‘238b319c570bfb97aad4ee816fb12efcc585acc0’,‘127.0.0.1’,‘Home Cinema@’,1467446161,NULL);
INSERT INTO RepoTokenPeerInfo VALUES(‘37327a264e796c8bb55811d56ec68268d38387d1’,‘238b319c570bfb97aad4ee816fb12efcc585acc0’,‘127.0.0.1’,‘Home Cinema@’,1467448543,NULL);
Seahub results in a similar error “Error in query (1406): Data too long for column ‘token’ at row 1”.
Corresponding sql file shows in lines 1405 and 1407:
Blockquote
INSERT INTO django_session VALUES(‘ovvubzvynx5l25gyju5thqbfolpmgw45’,‘eyJ2aXNpdGVkX2ZzXzgyNmM1NjYxNjRmNzQ1NmVhNzU0Ijp0cnVlfQ:1nbPwm:BEjnvA8y66Wiq0w_7Z4V3xydiaZqmjq_37Sl0oru-uk’,‘2022-04-05 16:52:56.016981’);
INSERT INTO django_session VALUES(‘jbq3skb3w8skyb82cpgmopbpqpbxlsft’,‘eyJ0ZXN0Y29va2llIjoid29ya2VkIn0:1nbXoy:yR6AituzDR0EtKc2Dt5sKG_j-rD0m84nn0CJKJkD5A8’,‘2022-04-06 01:17:24.091444’);
How do I fix such errors? Thanks a lot!
Hello, for these SQL statements that generate errors, they can be directly deleted.
Thanks for your fast reply.
Just out of interest, what are these referring to?
I would like to understand this, because I guess I will find more errors, adminer stopped at the first error for each import…
Thanks,
Ruediger
I guess the first error in seafile db refers to an old PC entry (HomeCinema) that has been removed from the seafile cloud long ago. so this might be some remnants? would it make sense to use a tool like sqliteadmin to clean up the database before running the conversion script? Or would this rather mess up everything?
Thanks
Ruediger
The two tables RepoTokenPeerInfo and django_session are not important. You can just ignore the records in the two tables.
This is what I’m doing. Seafile 11.0.5. Debian Bookworm. Works fine.
adduser --system --home /opt/seafile --group --shell /bin/bash --disabled-login seafile
su - seafile
mkdir python-venv
python3 -m venv /opt/seafile/python-venv
export PATH="/opt/seafile/python-venv/bin:$PATH"
pip3 install --timeout=3600 django==4.2.* future==0.18.* mysqlclient==2.1.* \
pymysql pillow==10.2.* pylibmc captcha==0.5.* markupsafe==2.0.1 jinja2 sqlalchemy==2.0.18 \
psd-tools django-pylibmc django_simple_captcha==0.6.* djangosaml2==1.5.* pysaml2==7.2.* pycryptodome==3.16.* cffi==1.15.1 python-ldap==3.4.3 lxml
export PYTHONPATH="/opt/seafile/python-venv/lib"
Add the updated PATH and PYTHONPATH to ~/.bashrc.