Skip to main content

Home

Backing up and recovering Unravel

Before you use the backup to recover Unravel, refer to the following sections in the Troubleshooting guide for recovery without backups:Troubleshooting

Backing-up offline

This document currently only covers offline backups where Unravel must be entirely stopped. You can backup the internal database as well as the external database.

  • Backing up when using an internal database

    1. Stop Unravel

      <Unravel installation directory>/unravel/manager stop
    2. Back up the files.

      tar czf /backup/tar.gz <path/to/data>
      
      ##Example
      tar czf /backup.tar.gz /opt/unravel/data
    3. Start Unravel.

      <Unravel installation directory>/unravel/manager start
  • Backing up when using an external database

    1. Stop Unravel

      <Unravel installation directory>/unravel/manager stop
    2. Back up the files.

      tar czf /backup/tar.gz <path/to/data>
      

      For example: tar czf /backup/tar.gz /opt/unravel/data

    3. Use your database backup tools to make a backup of the database.

      Ensure to back up the stored procedures using the --routines switch. For example, for MySQL, run the following command:

       <mysql_dir>/bin/mysqldump -u [username] –p[password] --routines [database_name] > [dump_file.sql]
    4. Start Unravel.

      <Unravel installation directory>/unravel/manager start

Note

If your environment allows for filesystem snapshots, you can minimize the downtime. In such a case, all you need to do is stop Unravel, make a snapshot, start Unravel, and then archive the data from the snapshot.

Using the data backup for Unravel recovery

You can restore the backup on a server with the same name. Also, ensure that Unravel should be run with the same user.

  1. Deploy the Unravel software.

    Caution

    Ensure to deploy the exact version of the software used for the backup. If you do not know what version was deployed, look in the backup for data/conf/current.yaml file to find the version information.

  2. Extract the backup tarball to where you have deployed Unravel binaries. For example, if you have deployed Unravel software to /opt/unravel, then run the following command:

    tar zxf /backup/tar.gz -C /opt/unravel

    External database note: If you are using an external database, use the database backup tools to recover the data.

    At this point, the /opt/unravel directory contains the recovered data directory and the newly installed software in versions/<unravel version>.

    Ensure that the data is on the same server and schema and must be accessed with the same credentials. If any of this differs, update the database: block in unravel.yaml before completing the recovery.

  3. Run the following command to restore. For example, for MySQL, run the following command:

    mysql -u [user] -p [database_name] < [filename].sql
  4. Run the setup command and provide extra parameters to use the configuration file.

    /opt/unravel/versions/4.7.0.0.2048/setup --config /opt/unravel/data/conf/unravel.yaml
  5. Start Unravel.

    /opt/unravel/manager start