[SOLVED] New install with mariadb/mysql and 2nd drive; How to move data location?

Hello, all… I’m back after having suffered a major stroke back in 2019, which set me back on my current project. I am currently in the process of replacing my existing Seafile server which has a lot of age on it.

I have decided to start fresh. This time, I decided to start with mariadb for the database. However, the new server has a small SSD drive which is for boot purposes. I have a secondary hard drive mounted and that’s where I would like the repos/data to be stored.

I looked through the seafile mysql install script and it appeared that it would ask me to input the location for the seafile data… However, that did not happen and the data is set up to store on the SSD drive. Although I’m a veteran with Linux and Seafile, I know very little about database technology such as mariadb.

What I noted after installation is that there is no seafile.ini file where I can specify where the data folder is located. So, my question is, how do I change the location where the repos/data will be stored? In a mysql/mariadb situation, is the data location handled there and stored in a mysql/mariadb handled folder, or is it still stored in the seafile-data folder under the seafile install folder?

How would I go about changing the location to that second hard drive? I have only completed the install script and have not yet started seafile and seahub for the first time…

Thanks in advance.

Easiest and fastest way to solve this is by soft link. Just move the seafile-data folder to a new location and create a link using ln -s. Option 2 is indeed changing the path in ccnet/seafile.ini. Don’t know if seafile has to be started once to create the files and folders mentioned above.

But, seafile.ini does not exist in a mysql/mariadb configuration. Previously, on my old server, changing the data directory as you mentioned in Option 2 was no problem. It was just a simple matter of changing the seafile.ini setting… I have considered using a soft/hard link, but which folder? I’m new to mysql/mariadb and I have no idea where the actual data/repos would be stored. Are they stored in mysql/maridb folders, such as /var/lib/mysql, or in the seafile-date folder under the Seafile installation folder?

Plus, there is no data so far. I have not yet started Seafile for the very first time.

Seafile repos are stored in seafile-data and seahub data, avatars and thumbnails, are stored in seahub-data. Still, why not just start the server and see what files / folders are created. Then shut down the server and move the files / folders of interest and create the links, or maybe modify the seafile.ini in case it’s created on fist server start.

1 Like

Very valid points. I will certainly try, but tomorrow. It’s late here, so I’m retiring for the night. I will post the results here when I can. Kudos.

Just checked the source of setup-seafile-mysql.py and # self.write_seafile_ini() is commented out. Same for the non-mysql version. So maybe linking is the best way forward.

@daniel.pan, is seafile.ini not supported anymore?

It is not supported anymore. Just use symbolic link.

The symlink worked, though it’s not my preference. Thanks, @axstet.