Seafile does not start after backup


I really need help.
Major F*** Up here (panic).

Luckily I have a backup. At least that is what I thought…

I always backed up the mysql databases as written in
I recovered them successfully with

mysql -u seafile -ppass ccnet-db < ccnet-db.sql
mysql -u seafile -ppass seafile-db < seafile-db.sql
mysql -u seafile -ppass seahub-db < seahub-db.sql

When trying to start seafile again I get:

./ start

[07/25/18 22:53:34] ../common/session.c(132): using config file /home/ck/
[07/25/18 22:53:34] ../common/ccnet-db.c(142): Error exec query CREATE TABLE IF NOT EXISTS EmailUser (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, email VARCHAR(255), passwd VARCHAR(256), is_staff BOOL NOT NULL, is_active BOOL NOT NULL, ctime BIGINT, reference_id VARCHAR(255),UNIQUE INDEX (email), UNIQUE INDEX (reference_id))ENGINE=INNODB: MySQL failed to execute: Specified key was too long; max key length is 767 bytes.
failed to run "ccnet-server -t"

I have no idea what I should do and would appreciate any help so much!

I am really in trouble here… So sorry…


If I try and “show tables” inside the database after I imported it, it seems that there are none.

That would be a catastrophe…

Try next
sudo mysqladmin -u seafile -ppass drop ccnet-db -f
sudo mysqladmin -u seafile -ppass drop seafile-db -f
sudo mysqladmin -u seafile -ppass drop seahub-db -f
sudo mysqladmin -u seafile -ppass create ccnet-db -f
sudo mysqladmin -u seafile -ppass create seafile-db -f
sudo mysqladmin -u seafile -ppass create seahub-db -f
mysql -u seafile -ppass ccnet-db < ccnet-db.sql
mysql -u seafile -ppass seafile-db < seafile-db.sql
mysql -u seafile -ppass seahub-db < seahub-db.sql

Thanks for the proposal.

Unfortunately the databases that I constantly backed up according to the Seafile Manual were empty, 0kB files.
I still have the seafile-data files but I understand that this is useless without the mysql databases?

In any case: should the back up manual for mysql databases in the seafile manual not be correct, then I would strongly recommend to update it.

All other users: Check the sizeof the backed up databases, please. I did not.

Lost gigabytes of important data, pictures etc. that I did not sync.



This should help. You could try and mount your data according to the manual.

And then you can save your valuable documents.

Will Seafile start without the database? From the manual:

Note: Before start seaf-fuse, you should have started seafile server with ./ start

I don’t know if I’ve ever started seafile without a database, but if it doesn’t start you can always reinstall, new installation would populate the database.

Before you do that change the name of or backup the current seafile data directory.

You’ll have the running seafile installation, and you can try and mount your old seafile data directory.

I don’t know if this would work, just the steps that I would take in your shoes.

If you decide to try this route please post your results here, or any issues I’ll try and help.

Best regards,

Thanks aca

Although I can’t believe that it will work, I will surely try this over the weekend (As long as there is hope… :wink: ).
I will then post what I did and if it worked.

Cheers, Chris