Migrate seafile-data content from one server to another


How could the content and libraries stored in seafile-data folder be migrated from one linux server to a different linux server?

1 Like

First: You need to migrate database too. Maybe read doc about backing up and restoring seafile server. Process is same but you move backup to another server. Read all: Backup and Recovery - Seafile Admin Manual

To answer your question:
For migration seafile-data folder I recommend use RSYNC. It’s fastest then SCP or SFTP or FTPS and more transparent for errors. And if there some error happend like connection lost, you can run it again and it will upload only missing or uncompleted files.

Or if you have enough disk space, you archive and compress whole seafile-data folder use tar for example, because upload one big file is everytime faster and more secured then bilions of small files(file chunks when we talk about seafile-data). On linux just something like sudo tar -czvf seafile-data.tar.gz /haiwen/seafile-data upload and on other server in target folder sudo tar -xzvf seafile-data.tar.gz.

1 Like

I also noticed this article: https:/manual.seafile.com/deploy_pro/migrate/, however I am missing migrate.sh script, is the source code available? I could not find it when I googled it.

Thank you! :grin: :rabbit:

Also from what I see in the article if you are backing up and recovering the data there is still data that gets lost in the process. So what is the actual way of moving seafile data from one server to another?

I moved Seafile with full content (DB+Data) to a Proxmox installation on a Raspberry Pi. Moving the Seafile server wasn’t that difficult.

  • install system, maria db, web server, acme client for let’s encrypt and ftp client on new server
  • shutdown Seahub, Seafile on original server
  • create hosts entry to locally switch domain/host name to new local server
  • create database dump on original server
  • move database dump to new system via ftp
  • move seafile data (and avatars) to new server via ftp
  • move config files in subfolders of seafile from old system to new one
  • import the db dump in new system
  • make sure that user with existing password
  • make sure the seafile user owns all files in seafile data and other relevant files
  • start seafile and seahub servers on new system
  • copy certificate folders
  • try to log on wirh ip adress
  • adjust gunicorn settings and external web server
  • restart web server
    → done!

Afterwards, you can delete the etc/hosts entry and change the port release to the new server.


It’s PRO feature so I guess you have community edition(free). From fast page review is this tool created to migrate to different storage type like from filesystem to S3. Maybe it can be used to filesystem to remote filesystem but I cannot tell you that … never use it.

Online new data created while backup running can be lost. If you shutdown seafile server(and database daemon to be sure no one write anything) then you are not going to lost anything.

1 Like

Done the migration however I get this error after starting the seafile.sh and seahub.sh services:
OperationalError: (1054, “Unknown column ‘api2_tokenv2.created_at’ in ‘field list’”)

Any thoughts :cold_sweat:? Can’t really put my finger on how to restore functionality. :pensive: :pensive:

Didn’t you install same seafile version on new server? Looks like you missed right one. Version on new server have to be same as on old server.

1 Like

Nope, the versions are different. Does this mean I cannot restore any db’s from a server with a different version?

No, it must be same. After restore you can update new seafile server

1 Like