Run Relational Migrator as a System Service on Debian
On this page
When you install Relational Migrator on a Debian server, you can also set up Relational Migrator to run as a system service. By running Relational Migrator as a system service, Relational Migrator automatically starts when the server starts.
Steps
Create a
/etc/systemd/system/migrator.service
file.Copy the text below into the
/etc/systemd/system/migrator.service
file. Replace the binary path as needed.[Unit] Description=MongoDB Relational Migrator [Service] ExecStart="/opt/mongodb-relational-migrator/bin/MongoDB Relational Migrator [Install] WantedBy=multi-user.target Reload
systemd
to read the newly created service.systemctl daemon-reload Enable the Relational Migrator service to automatically start when the server starts.
You can manage the service with the following
systemctl
commands:systemctl enable migrator.service systemctl start migrator.service