How to Configure File DB Path?
Overview
The file database is a storage that consists of patches, attachments, queue persistence files, and other component files. Specifying a proper file path for it lets you control where your database file is stored for easy access. Previously, the database file was stored in the default path. But now, you can configure it to the desired location, provided the new location (directory) already exists, and contains the required permissions.
Here, the “home/flotomate/filedb” path is used for the new filedb path.
The File DB path should not be overwritten in Patch or Upgrade.
Prerequisites
- The new directory should already be present.
- The fmt user permissions should be granted to access the new directory. You can grant them using the below commands:
chown -R fmtuser:fmtusergroup /{new_directory_path}/{server_name}
setfacl -m u:'fmtuser':rwx /{new_directory_path}
setfacl -m g:'fmtusergroup':rwx /{new_directory_path}
For example, execute the below commands to grant permissions for the Main Server:
chown -R fmtuser:fmtusergroup /home/flotomate/filedb/main-server
For User:
setfacl -m u:'fmtuser':rwx /home
setfacl -m u:'fmtuser':rwx /home/flotomate
setfacl -m u:'fmtuser':rwx /home/flotomate/filedb
setfacl -m u:'fmtuser':rwx /home/flotomate/filedb/main-server
For Usergroup:
setfacl -m g:'fmtusergroup':rwx /home
setfacl -m g:'fmtusergroup':rwx /home/flotomate
setfacl -m g:'fmtusergroup':rwx /home/flotomate/filedb
setfacl -m g:'fmtusergroup':rwx /home/flotomate/filedb/main-server
Similarly, you can grant permissions for Analytics and File Server directories.
Run the above commands using sudo if you face any issue.
Procedure
To configure the File DB path of the Main Server, Analytics Server, and File Server, follow the below steps:
Main Server File DB
Go to the Main-Server Config folder using the below path:
/opt/flotomate/main-server/lib/boot-hosted-exec.conf
Edit the value of the DfileDb property as shown below:
Default Path: -DfileDb=../filedb
Sample Configured Path: -DfileDb=
/home/flotomate/filedb/main-server
Once done, save the file.
Next, restart the service using the below commands:
Command to Stop the service:
systemctl stop ft-main-server
Command to Start the service:
systemctl start ft-main-server
Nginx Config File
Once the Main Server File DB path is changed, change the path of the Nginx Config file for patch mirror using the below steps:
Go to the Nginx Config file using the below path:
/etc/nginx/conf.d/fmt_nginx.conf
Edit the path of the patch mirror as shown below:
Default Path:
location /patchmirror {
alias /opt/flotomate/main-server/filedb/patch_repo;
autoindex on;
}Sample Configured Path:
location /patchmirror {
alias /home/flotomate/filedb/main-server;
autoindex on;
}Once done, save the file.
Next, restart the service using the below commands:
Command to Stop the service:
systemctl stop nginx
Command to Start the service:
systemctl start nginx
CM Analytics Server File DB
Go to the CM Analytics Server Config folder using the below path:
/opt/flotomate/cm-analytics/lib/analytics-hosted-exec.conf
Edit the value of the DfileDb property as shown below:
Default Path: -DfileDb=../filedb
Sample Configured Path: -DfileDb=
/home/flotomate/filedb/analytics-server
Once done, save the file.
Next, restart the service using the below commands:
Command to Stop the service:
systemctl stop ft-analytics-server
Command to Start the service:
systemctl start ft-analytics-server
File Server File DB
Go to the File Server Config folder using the below path:
/opt/flotomate/ fileserver/lib/fileserver-hosted-exec.conf
Edit the value of the DfileDb property as shown below:
Default Path: -DfileDb=../filedb
Sample Configured Path: -DfileDb=
/home/flotomate/filedb/file-server
Once done, save the file.
Next, restart the service using the below commands: Command to Stop the service:
systemctl stop ft-file-server
Command to Start the service:
systemctl start ft-file-server