Database Server Backup and Restore

All ESET Remote Administrator information and settings are stored in the database. We recommend that you back up your database regularly to prevent loss of data. Refer to the appropriate section below for your database:

validation-status-icon-infoNOTE:  The backup can also be used later when migrating ESET Remote Administrator to a new server.


MS SQL Backup examples

To backup an MS SQL database to a file, follow the examples shown below:

validation-status-icon-warning IMPORTANT: these examples are intended for use with default settings (for example, default database name and database connection settings). Your backup script will need to be customized to accommodate any changes you have made to default settings.

One time database backup

Execute this command in a Windows command prompt to create a backup into file named BACKUPFILE:

SQLCMD -S HOST\ERASQL -q "BACKUP DATABASE ERA_DB TO DISK = N'BACKUPFILE'"

validation-status-icon-infoNOTE: In this example HOST stands for the IP address or hostname and ERASQL for the name of the MS SQL server instance.

Regular database backup with sql script

Choose one of the following SQL scripts:

a)Create regular backups and store them based on date of creation:

1. @ECHO OFF

2. SQLCMD.EXE -S HOST\ERASQL -d ERA_DB -E -Q "BACKUP DATABASE ERA_DB TO DISK = N'BAKCUPFILE'

   WITH NOFORMAT,INIT, NAME = N'ERA_DB', SKIP, NOREWIND, NOUNLOAD, STOP_ON_ERROR, CHECKSUM, STATS=10"

3. REN BACKUPFILE BACKUPFILE-[%DATE%-%RANDOM%]

b)Append your backup to one file:

1. @ECHO OFF

2. SQLCMD.EXE -S HOST\ERASQL -d ERA_DB -E -Q "BACKUP DATABASE ERA_DB TO DISK = N'BAKCUPFILE'

   WITH NOFORMAT, NOINIT, NAME = N'ERA_DB', SKIP, NOREWIND, NOUNLOAD, STOP_ON_ERROR, CHECKSUM, STATS=10"

MS SQL restore

To restore a MS SQL database from a file, follow the example shown below:

SQLCMD.EXE -S HOST\ERASQL -d ERA_DB -E -Q "RESTORE DATABASE ERA_DB FROM DISK = N'BACKUPFILE'"


MySQL backup

To backup a MySQL database to a file, follow the example shown below:

mysqldump --host HOST --disable-keys --extended-insert --routines -u ROOTLOGIN -p ERADBNAME > BACKUPFILE

validation-status-icon-infoNOTE: In this example HOST stands for the IP address or hostname of the MySQL server, ROOTLOGIN for the root account of the MySQL Server, and ERADBNAME stands for ERA database name.

If you want to restore the database backup, follow the instructions for your database below:

MySQL restore

To restore a MySQL database from a file, follow the example shown below:

mysql --host HOST -u ROOTLOGIN -p ERADBNAME < BACKUPFILE

validation-status-icon-infoNOTE: For more information on Microsoft SQL Server backup please visit Microsoft technet website. For more information on MySQL Server backup please visit MySQL documentation website.