关于seafile数据迁移

最近想把seafile从原来的服务器数据迁移到新服务器里,在运行./setup-seafile-mysql.sh后到验证seahub库时出现了问题,显示表admin_log_adminlog已存在,我是不是要把seabub库里所有的表要预先drop呢?

Checking python on this machine …
Checking python module: setuptools … Done.
Checking python module: python-imaging … Done.
Checking python module: python-mysqldb … Done.


This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at

    https://github.com/haiwen/seafile/wiki

Press ENTER to continue

Error: Ccnet config dir “/cloud/ccnet” already exists.
[root@localhost seafile-server-6.1.2]# ./setup-seafile-mysql.sh
Checking python on this machine …
Checking python module: setuptools … Done.
Checking python module: python-imaging … Done.
Checking python module: python-mysqldb … Done.


This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at

    https://github.com/haiwen/seafile/wiki

Press ENTER to continue

What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] seafile

What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server’s ip or domain ] 192.168.200.165

Where do you want to put your seafile data?
Please use a volume with enough free space
[ default “/cloud/seafile-data” ]

/cloud/seafile-data already exists

Where do you want to put your seafile data?
Please use a volume with enough free space
[ default “/cloud/seafile-data” ]

Which port do you want to use for the seafile fileserver?
[ default “8082” ]


Please choose a way to initialize seafile databases:

[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 2

What is the host of mysql server?
[ default “localhost” ] 192.168.200.161

From which hosts could the mysql account be used?
[ default “%” ] %

What is the port of mysql server?
[ default “3306” ]

Which mysql user to use for seafile?
[ mysql user for seafile ] seafile

What is the password for mysql user “seafile”?
[ password for seafile ]

verifying password of user seafile … done

Enter the existing database name for ccnet:
[ ccnet database ] ccnet-db

verifying user “seafile” access to database ccnet-db … done

Enter the existing database name for seafile:
[ seafile database ] seafile-db

verifying user “seafile” access to database seafile-db … done

Enter the existing database name for seahub:
[ seahub database ] seahub-db

verifying user “seafile” access to database seahub-db … done


This is your configuration

server name:            seafile
server ip/domain:       192.168.200.165

seafile data dir:       /cloud/seafile-data
fileserver port:        8082

database:               use existing
ccnet database:         ccnet-db
seafile database:       seafile-db
seahub database:        seahub-db
database user:          seafile

Press ENTER to continue, or Ctrl-C to abort

Generating ccnet configuration …

done
Successly create configuration dir /cloud/ccnet.
Generating seafile configuration …

Done.
done
Generating seahub configuration …


Now creating seahub database tables …


Error: Failed to init seahub database: Table ‘admin_log_adminlog’ already exists

同问呀。。。…

对,你需要把新服务器上的数据库里seafile用到的三个库清理干净,然后在吧原来数据库里的数据导入到新的服务器上,具体过程可以看下这个文档 :https://manual-cn.seafile.com/maintain/backup_recovery.html