Moving to a new server

I have to change to OS on my cubietruck from lubuntu to debian. On Lubuntu seafile runs with apache2 and SQL data base. The seafile data is on an external HD.

What is the best way to move all to the new server ?

Thx

Mysql dump and rsync all files. That’s it more or less.