Restore ScaleGrid Controller

Preparations and pre-requisites

In order to restore a copy of your controller onto a new virtual machine, there are a few things you must have backed up. Please go through the list below immediately after installation, and make sure you set up backups appropriately.

Backup the data encryption key

You need to backup the encryption key of your ScaleGrid controller. This can be found at /usr/lib/scalegrid/server/conf/ek.dat. Once your ScaleGrid controller is set up, please copy this file out to a secure location.


Store the encryption key safely!

For security reasons, we recommend storing this key separately from your data. You must also lock-down access to this key appropriately.


Important note about the encryption key

This key does not change during the life-time of your controller. You need to back it up only once - immediately after installation. However it is a good idea to periodically validate that the backup is still accessible, and has not been corrupted.

Backup the data

All the information required to restore the ScaleGrid controller is stored in a MySQL database, installed on the same machine as the controller. During the installation process, ScaleGrid sets up regular backups of this database, on to a location chosen by the customer. The backups are performed using the automysqlbackup tool - which takes a dump of the required database(s) and the scheduling is done via crontab.


Backup frequency and retention

  • The default backup frequency is once a day
  • The default backup retention time is 13 days

After installation, we recommend editing the configuration to suit your specific needs. For example, you can set up weekly and monthly backups that are retained for longer. If you need help with detailed configuration instructions, please reach out to [email protected] and we will help you out.


You must set up appropriate DR strategies for your NFS backup server. This would be independent of ScaleGrid setup steps.


You will need the following pieces in order to successfully restore a backed up controller:

  • The OVA to deploy the ScaleGrid Controller appliance. Please contact [email protected] if you do not have the download link.
  • The ScaleGrid controller restore-script. Please contact [email protected] if you do not have this script.
  • The backed up encryption key
  • The backed up database from the old controller.
  • You will find all the backups under /daily/sgdirector. Using the command ls -Art | tail -n 1 will tell you which is the latest backup.
  • The root user ([email protected]) password, and 2-FA code (if enabled) of the original controller
  • The IP address of the original controller

Preparing for restore

  1. Deploy the ScaleGrid controller appliance on your vCenter server.


If you are restoring on the same subnet, we recommend keeping the controller IP address unchanged. Please edit the ifcfg file and set up the static IP before proceeding to the next step.

  1. Install a new instance of the ScaleGrid service. Please refer to our help doc if you need a refresher on the process.
  2. Once the installation has completed, and a new root-user password has been generated, proceed to the next step. (You can discard this password - it will not be required)
  3. Move the restore-script, your database backup, and the key-backup onto this machine.

Executing the restore

First you must provide execute privileges to the restore script chmod u+x Then execute it with root privileges sudo ./

The restore script will ask for a few key pieces of information:

Location of ScaleGrid Controller database backup

Please enter the location of the ScaleGrid Controller database backup (example: /home/sguser/daily_sgdirector_2021-06-04_16h24m_Friday.sql.gz):
You may enter either an absolute path or a path relative to the current directory. The script will validate that it can read the backed up data before proceeding.

Location of ScaleGrid Controller encryption key

Please enter the location of the ScaleGrid Controller encryption key (example: /home/sguser/ek.dat):
You may enter either an absolute path or a path relative to the current directory. The script will validate that it can read the backed up encryption key before proceeding.

Root user password

Please enter the root user password (of the install you're trying to restore):
You must enter the password of the root user ([email protected]) of the original controller here. This will be used to log-in to the restored controller, and re-create certain artifacts.

Confirm ScaleGrid Controller installation

Is the ScaleGrid Controller installed on this machine? [y|n]:
This asks you to confirm that the ScaleGrid Controller installation has been completed on this machine. Please note, you can not restore to an empty ScaleGrid appliance - the controller must have been already installed before restore. If you have not done so, please run the script available in your root-directory, before re-running the restore script.

ScaleGrid Controller IP address

Does <IP-Address> match the IP of the old ScaleGrid controller? [y|n]:
This asks you to confirm if you’re restoring to the same subnet as the original - and this machine uses the same IP address as the original. If the IP address has changed between backup and restore, the database machines will need to be updated.

Two-factor authentication

Please enter your 2-FA code:
You will see this prompt if, and only if, your original server had 2-FA enabled for the root user ([email protected]). The prompt will appear after the database restore has been completed - when the script attempts to log-in to the newly restored controller and recreate certain artifacts.

Restore completed

And that’s it. Please wait for the restore script to complete and display the following message:
The restore process has been completed. Please log-in through ScaleGrid console and validate the restore

How long the restore process takes will depend on the number of databases it manages, as well as whether the IP changed or not. Once the process completes. please log-in with your credentials and validate the restore