Seafile test server broken after backup / restore


#1

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


#2

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


#3

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.