Home

Restoring the MySQL database
  1. Stop all Unravel daemons on the Unravel server before starting the restore procedure.

    service unravel_all.sh stop
  2. Download restore script. The MD5 checksum is: 59e3aaac8dd6243bf806be22a8a8faf3 .

    cd /tmp/ wget https://preview.unraveldata.com/unravel/tools/db/restore-db.sh chmod 755 restore-db.sh
  3. Run the restore script with the required parameters as shown, where:

    • backup-file: The fully qualified name of the file created when backing up your database.

    • host: If you aren't restoring the database on the Unravel server this must be the fully qualified domain name or IP address of the MySQL database host.

    • port: Port number for MySQL host,

    • db_name: Name of the database you are restoring.

    • root-password: Root password of the database you are restoring.

    Tip

    If MySQL is running as part of the Unravel server, you can use the following command to get the root password.

    grep 'DB_ROOT_PASSWORD' /srv/unravel/unravel.install.include
    /tmp/restore-db.sh -b backup-file -h host -p port -n db_name -r  root-password 

    For example

    /tmp/restore-db.sh -b "/tmp/unravel_mysql_prod.backup.20200306t0520Z.sql.gz" -h localhost -p 3306 -n unravel_mysql_prod -r unraveldata
  4. Start all unravel daemons in the Unravel server using the following command.

    service unravel_all.sh start