Mideye Server 5 Backup and Restore Guide
Overview
Section titled “Overview”Regular backups of your Mideye Server 5 configuration and database are essential for disaster recovery and migration. This guide explains which files to back up and how to restore them on Windows and Linux systems.
What you need to back up:
- Configuration file (
application-prod.yml) - Certificate keystore (
keystore.p12) - Database (MSSQL on Windows, MySQL/MariaDB on Linux)
- Log configuration (
logback.xml) — optional
Installation Locations
Section titled “Installation Locations”| Platform | Installation Directory |
|---|---|
| Windows | C:\Program Files (x86)\Mideye Server\ |
| Linux | /opt/mideyeserver/ |
Key Files for Backup
Section titled “Key Files for Backup”Within the installation directory, the config folder contains critical files required for server recovery:
| File | Description | Importance |
|---|---|---|
application-prod.yml | Main configuration file with database connection, RADIUS settings, and server options | Critical |
keystore.p12 | Certificate store containing SSL certificates and encryption keys for database | Critical |
logback.xml | Logging configuration (log levels, file rotation, syslog settings) | Optional |
Backup Procedures
Section titled “Backup Procedures”Windows Backup
Section titled “Windows Backup”-
Back up the configuration directory:
C:\Program Files (x86)\Mideye Server\config\Essential files:
application-prod.ymlkeystore.p12
-
Back up the database:
Use SQL Server Management Studio (SSMS) or T-SQL to create a full backup:
BACKUP DATABASE [MideyeServer]TO DISK = 'C:\Backups\MideyeServer_backup.bak'WITH FORMAT, COMPRESSION;See Microsoft SQL Server Backup Guide for details.
-
Optional: Back up logs
C:\Program Files (x86)\Mideye Server\log\
Linux Backup
Section titled “Linux Backup”-
Back up the configuration directory:
Terminal window sudo tar -czvf mideye-config-backup.tar.gz /opt/mideyeserver/config/Essential files:
/opt/mideyeserver/config/application-prod.yml/opt/mideyeserver/config/keystore.p12
-
Back up the MySQL/MariaDB database:
Terminal window mysqldump -u root -p MideyeServer > MideyeServer_backup.sqlOr with compression:
Terminal window mysqldump -u root -p MideyeServer | gzip > MideyeServer_backup.sql.gz -
Optional: Back up logs
Terminal window sudo tar -czvf mideye-logs-backup.tar.gz /opt/mideyeserver/log/
Restore Procedures
Section titled “Restore Procedures”Prerequisites
Section titled “Prerequisites”- Install the same version of Mideye Server 5 as the backup
- Set up the database server (MSSQL on Windows, MySQL/MariaDB on Linux)
- Have your backup files available
Windows Restore
Section titled “Windows Restore”-
Install Mideye Server 5 on the target server (see Windows Installation)
-
Stop the Mideye Server service:
net stop MideyeServer -
Restore the database:
RESTORE DATABASE [MideyeServer]FROM DISK = 'C:\Backups\MideyeServer_backup.bak'WITH REPLACE; -
Restore configuration files: Copy
application-prod.ymlandkeystore.p12to:C:\Program Files (x86)\Mideye Server\config\ -
Update database connection (if server changed): Edit
application-prod.ymland update the database connection string if the database server hostname or credentials have changed. -
Start the service:
net start MideyeServer
Linux Restore
Section titled “Linux Restore”-
Install Mideye Server 5 on the target server (see Linux Installation)
-
Stop the Mideye Server service:
Terminal window sudo systemctl stop mideyeserver -
Restore the database:
Terminal window mysql -u root -p MideyeServer < MideyeServer_backup.sqlOr from compressed backup:
Terminal window gunzip < MideyeServer_backup.sql.gz | mysql -u root -p MideyeServer -
Restore configuration files:
Terminal window sudo tar -xzvf mideye-config-backup.tar.gz -C /Or copy files manually to:
/opt/mideyeserver/config/ -
Set correct permissions:
Terminal window sudo chown -R mideyeserver:mideyeserver /opt/mideyeserver/config/sudo chmod 600 /opt/mideyeserver/config/keystore.p12 -
Update database connection (if server changed): Edit
/opt/mideyeserver/config/application-prod.ymland update the database connection if needed. -
Start the service:
Terminal window sudo systemctl start mideyeserver
Best Practices
Section titled “Best Practices”Quick Reference
Section titled “Quick Reference”| Item | Windows Path | Linux Path |
|---|---|---|
| Config directory | C:\Program Files (x86)\Mideye Server\config\ | /opt/mideyeserver/config/ |
| Main config | config\application-prod.yml | config/application-prod.yml |
| Certificate store | config\keystore.p12 | config/keystore.p12 |
| Log config | config\logback.xml | config/logback.xml |
| Log files | log\ | log/ |