I was using a QNAP NAS and run FileRun as a docker. However, because of Changes to storage offerings across Microsoft 365 Education, I will no longer have access to a cloud storage as backup. To ensure I can adopt to a 3-2-1 backup strategy, I opted for another NAS by converting my old PC and installed Unraid on it.

I migrate my FileRun to my Unraid NAS, as the processing power of my old PC is much better than the QNAP NAS. It was somehow a tricky process. Here are the note for future reference.

Database Migration

I will need to export the existing database first.

In the mariadb docker under my QNAP NAS, I run the following script:

mysqldump --passwd --quick filerundb | gzip > filerun.gz

It will ask you to provide mariadb’s root password. After a while, the database file is exported.

Copy the file out from the docker, by executing this command:

sudo docker cp [your container id]:filerun.gz /share/Data/filerun.gz 

Fixing the Database Error 

If you get the ‘database error’, you can check the configuration in filerun’s /html/system/data/autoconfig.php, to ensure the database is correct.

In filerun docker configuration, we will need to insert the FR_DB_HOST value. It will connect it to the database server, but if we insert the IP to it, since this IP address is dynamic, there can be times where the database’s IP is changed.

Then we should use the name of the database container to be the value in FR_DB_HOST. But if we use the default bridge network on unraid, it could not get access to the database server.

We can create a custom network in console by using docker network create filerun-network.

Then configure both the filerun and mariadb docker network by using this custom:filerun-network. Follows by filerun’s configuration, fill in FR_DB_HOST with the name of mariadb docker. Then the connection with database will be successful. Also, update the /html/system/data/autoconfig.php when necessary.