Seafile test server broken after backup / restore

i followed this guide
https://manual.seafile.com/deploy/deploy_with_docker.html

and when testing backup / restore everything seems fine but when i then restart server i get this error and only after a restore a normal restart is fine

seafiletest | *** Running /scripts/start.py…
seafiletest | Aug 8 12:29:43 29b109c6ba1f cron[44]: (CRON) INFO (pidfile fd = 3)
seafiletest | Aug 8 12:29:43 29b109c6ba1f cron[44]: (CRON) INFO (Skipping @reboot jobs – not system startup)
seafiletest | [2018-08-08 12:29:45] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
seafiletest |
seafiletest | failed to run “ccnet-server -t”
seafiletest | [08/08/18 12:29:45] …/common/session.c(132): using config file /opt/seafile/conf/ccnet.conf
seafiletest | [08/08/18 12:29:45] …/common/ccnet-db.c(124): Failed to get database connection: Failed to connect to MySQL: Access denied for user ‘seafile’@‘localhost’ (using password: YES).
seafiletest | [08/08/18 12:29:45] user-mgr.c(769): Failed to create user db tables.
seafiletest | Traceback (most recent call last):
seafiletest | File “/scripts/start.py”, line 85, in
seafiletest | main()
seafiletest | File “/scripts/start.py”, line 71, in main
seafiletest | call(’{} start’.format(get_script(‘seafile.sh’)))
seafiletest | File “/scripts/utils/init.py”, line 68, in call
seafiletest | return subprocess.check_call(*a, **kw)
seafiletest | File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
seafiletest | raise CalledProcessError(retcode, cmd)
seafiletest | subprocess.CalledProcessError: Command ‘/opt/seafile/seafile-server-6.3.2/seafile.sh start’ returned non-zero exit status 1
seafiletest | *** /scripts/start.py exited with status 1.
seafiletest | *** Shutting down runit daemon (PID 37)…
seafiletest | *** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown…
seafiletest | Aug 8 12:29:47 29b109c6ba1f syslog-ng[30]: syslog-ng shutting down; version=‘3.5.6’
seafiletest | Aug 8 12:29:47 29b109c6ba1f syslog-ng[30]: EOF on control channel, closing connection;
seafiletest | *** Killing all processes…
seafiletest | *** Running /etc/my_init.d/01_create_data_links.sh…
seafiletest | *** Running /etc/my_init.d/10_syslog-ng.init…
seafiletest | Aug 8 12:30:16 29b109c6ba1f syslog-ng[31]: syslog-ng starting up; version=‘3.5.6’
seafiletest | Aug 8 12:30:17 29b109c6ba1f syslog-ng[31]: EOF on control channel, closing connection;
seafiletest | *** Running /etc/my_init.d/99_mysql_setup.sh…
seafiletest | *** Running /etc/rc.local…
seafiletest | *** Booting runit daemon…
seafiletest | *** Runit started as PID 38
seafiletest | *** Running /scripts/start.py…
seafiletest | Aug 8 12:30:17 29b109c6ba1f cron[45]: (CRON) INFO (pidfile fd = 3)
seafiletest | Aug 8 12:30:17 29b109c6ba1f cron[45]: (CRON) INFO (Skipping @reboot jobs – not system startup)
seafiletest | [2018-08-08 12:30:19] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
seafiletest |
seafiletest | failed to run “ccnet-server -t”
seafiletest | [08/08/18 12:30:19] …/common/session.c(132): using config file /opt/seafile/conf/ccnet.conf
seafiletest | [08/08/18 12:30:19] …/common/ccnet-db.c(124): Failed to get database connection: Failed to connect to MySQL: Access denied for user ‘seafile’@‘localhost’ (using password: YES).
seafiletest | [08/08/18 12:30:19] user-mgr.c(769): Failed to create user db tables.
seafiletest | Traceback (most recent call last):
seafiletest | File “/scripts/start.py”, line 85, in
seafiletest | main()
seafiletest | File “/scripts/start.py”, line 71, in main
seafiletest | call(’{} start’.format(get_script(‘seafile.sh’)))
seafiletest | File “/scripts/utils/init.py”, line 68, in call
seafiletest | return subprocess.check_call(*a, **kw)
seafiletest | File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
seafiletest | raise CalledProcessError(retcode, cmd)
seafiletest | subprocess.CalledProcessError: Command ‘/opt/seafile/seafile-server-6.3.2/seafile.sh start’ returned non-zero exit status 1
seafiletest | *** /scripts/start.py exited with status 1.
seafiletest | *** Shutting down runit daemon (PID 38)…
seafiletest | *** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown…
seafiletest | Aug 8 12:30:22 29b109c6ba1f syslog-ng[31]: syslog-ng shutting down; version=‘3.5.6’
seafiletest | Aug 8 12:30:22 29b109c6ba1f syslog-ng[31]: EOF on control channel, closing connection;
*** Killing all processes…

i have tryed to change
docker exec -it seafile mysqldump -uroot --opt ccnet_db > ccnet_db.sql
to
docker exec -it seafile mysqldump -u root --opt ccnet_db > ccnet_db.sql

but its still the same ? only thing different from the guide is that i am using docker-compose

thanks in advance for any help here

if i only restore storage folder (/seafile/seafile-data/storage/*)

and run
docker exec -it seafiletest /bin/sh -c “mysql -uroot ccnet_db < /shared/ccnet_db.sql”
docker exec -it seafiletest /bin/sh -c “mysql -uroot seafile_db < /shared/seafile_db.sql”
docker exec -it seafiletest /bin/sh -c “mysql -uroot seahub_db < /shared/seahub_db.sql”

it seams to start fine???

is that enough?
it’s not what is in the guide
https://manual.seafile.com/deploy/deploy_with_docker.html

the error was i didn’t backup seafile root folder but /root/seafile
a stupid error from my side, it is working as i should.

I have a similar problem while restoring Seafile data with new Docker containers (server migration).
I did the restore of the MySql database and the Seafile root folder.

But now the Seafile container does not start:

*** Booting runit daemon...

*** Runit started as PID 38

*** Running /scripts/start.py...

Jan 26 15:14:23 3208e2b35c2c cron[43]: (CRON) INFO (pidfile fd = 3)

Jan 26 15:14:23 3208e2b35c2c cron[43]: (CRON) INFO (Skipping @reboot jobs -- not system startup)

[2020-01-26 15:14:27] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.

waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' (111)")

waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' (111)")

[01/26/2020 15:14:27][upgrade]: The container was recreated, running minor-upgrade.sh to fix the media symlinks

[01/26/2020 15:14:27][upgrade]: Running script /opt/seafile/seafile-pro-server-7.0.11/upgrade/minor-upgrade.sh

-------------------------------------------------------------

This script would do the minor upgrade for you.

Press [ENTER] to contiune

-------------------------------------------------------------

------------------------------

migrating avatars ...

DONE

------------------------------

Moving the elasticsearch's configuration file ...

/bin/cp: '/opt/seafile/seafile-server-latest/pro/elasticsearch/config/jvm.options' and '/opt/seafile/seafile-pro-server-7.0.11/pro/elasticsearch/config/jvm.options' are the same file

updating seafile-server-latest symbolic link to /opt/seafile/seafile-pro-server-7.0.11 ...

DONE

------------------------------

** Message: seafile-controller.c(1157): loading seafdav config from /opt/seafile/conf/seafdav.conf

failed to run "ccnet-server -t"

[01/26/20 15:14:27] ../common/session.c(139): using config file /opt/seafile/conf/ccnet.conf

[01/26/20 15:14:27] ../common/license.c(406): Loading license file /opt/seafile/seafile-license.txt ..

[01/26/20 15:14:27] ../common/license.c(409): License file /opt/seafile/seafile-license.txt does not exist, allow at most 3 trial users

License file /opt/seafile/seafile-license.txt does not exist, allow at most 3 trial users

[01/26/20 15:14:27] ../common/ccnet-db.c(131): Failed to get database connection: Failed to connect to MySQL: Access denied for user 'seafile'@'172.18.0.5' (using password: YES).

[01/26/20 15:14:27] user-mgr.c(104): Failed to get user number from DB.

Traceback (most recent call last):

File "/scripts/start.py", line 86, in <module>

main()

File "/scripts/start.py", line 71, in main

call('{} start'.format(get_script('seafile.sh')))

File "/scripts/utils/__init__.py", line 69, in call

return subprocess.check_call(*a, **kw)

File "/usr/lib/python2.7/subprocess.py", line 190, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '/opt/seafile/seafile-pro-server-7.0.11/seafile.sh start' returned non-zero exit status 1

*** /scripts/start.py exited with status 1.

*** Shutting down runit daemon (PID 38)...

*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...

Jan 26 15:14:27 3208e2b35c2c syslog-ng[29]: syslog-ng shutting down; version='3.13.2'

*** Killing all processes...

did I miss anything? seems to be a permission problem with the database.