Moving a Model Manager Server Database
You can move the data directories and backup directories of a Model Manager server database using Managed Server Components to another file system location. This is necessary, for example, if you want to keep using the Default managed database for a Model Manager server but the available space on the disk containing the server installation is not sufficient.
This section contains the necessary steps to move the data directories and backup directories of the Default managed database when running the Model Manager server as a Windows® service using the predefined LocalService user account. The new directories are inside a hypothetical D:\ModelManagerServer for the data directories and E:\ModelManagerServerBackup for the backup directories. You can adapt the example by skipping certain steps if you only want to move some of the directories. You can also adapt it by modifying paths if you are running with a different user account, if running on another operating system, or if moving some other Model Manager server database.
Start by creating the parent directories to the new data directories and backup directories via, for example, a system file explorer on the server computer:
1
Create the ModelManagerServer directory on the D drive and the ModelManagerServerBackup directory on the E drive.
Next, deactivate the Model Manager server database via the Model Manager server web interface:
2
On the Database Configurations page in the System administration area, click Default managed database.
3
On The Database Configuration Page for the Default managed database, click the Deactivate button.
By deactivating the database, you prevent users from accessing the database via COMSOL Multiphysics or via the Model Manager server web interface while its data directories are being moved.
You will move the directories for each of the three managed server components used by the Default managed database by first stopping the component’s subprocess (if any), moving its directories, updating its configuration, and then starting the subprocess again. For the managed SQL database server:
4
On the Managed SQL Database Servers page in the System administration area, click Default managed PostgreSQL® server.
5
On The Managed SQL Database Server Page for the Default managed PostgreSQL® server, click the Stop button.
The data directory of the managed SQL database server is located inside
C:\Windows\ServiceProfiles\LocalService\AppData\Local\COMSOL\
ModelManager\ManagedDatabases\default-managed
as the data subdirectory. Its backup directory is located inside
C:\Windows\ServiceProfiles\LocalService\AppData\Local\COMSOL\
ModelManager\ManagedDatabases\default-managed-backup
as the data_backup subdirectory.
6
Move the data subdirectory to the ModelManagerServer directory on the D drive so that its new path becomes D:\ModelManagerServer\data.
7
Move the data_backup subdirectory to the ModelManagerServerBackup directory on the E drive so that its new path becomes E:\ModelManagerServerBackup\data_backup.
8
On The Managed SQL Database Server Page for the Default managed PostgreSQL® server, click the Edit button.
9
Write D:\ModelManagerServer\data in the Data directory field.
10
Write E:\ModelManagerServerBackup\data_backup in the Backup root directory field.
11
Click the Save button.
12
Click the Start button to start the managed SQL database server.
The data directory and backup directory for the managed resources directory is found next to those of the managed SQL database server as the resources subdirectory and the resources_backup subdirectory respectively.
13
Move the resources subdirectory to the ModelManagerServer directory on the D drive so that its new path becomes D:\ModelManagerServer\resources.
14
Move the resources_backup subdirectory to the ModelManagerServerBackup directory on the E drive so that its new path becomes E:\ModelManagerServerBackup\resources_backup.
15
On the Managed Resources Directories page in the System administration area, click Default managed resources directory.
16
On The Managed Resources Directory Page for the Default managed resources directory, click the Edit button.
17
Write D:\ModelManagerServer\resources in the Data directory field.
18
Write E:\ModelManagerServerBackup\resources_backup in the Backup root directory field.
19
Click the Save button.
For the managed search index server:
20
On the Managed Search Index Servers page in the System administration area, click Default managed Apache Solr™ server.
21
On The Managed Search Index Server Page for the Default managed Apache Solr™ server, click the Stop button.
The data directory for the managed search index server is found next to that of the managed SQL database server as the index subdirectory. It has no backup directory.
22
Move the index subdirectory to the ModelManagerServer directory on the D drive so that its new path becomes D:\ModelManagerServer\index.
23
On The Managed Search Index Server Page for the Default managed Apache Solr™ server, click the Edit button.
24
Write D:\ModelManagerServer\index in the Data directory field.
25
Click the Save button.
26
Click the Start button to start the managed search index server.
Finally, activate the Model Manager server database:
27
On The Database Configuration Page for the Default managed database, click the Activate button.
The Model Manager server database is now accessible again.