Skip to main content

Home

Rolling back after a failed upgrade

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

To roll back after a failed upgrade, you need to follow these steps:

  1. Back-up data.

    The following steps cover 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
  2. Restore backup.

    Note

    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 command to restore. For example, for MySQL, run the following command:

      mysql -u [user] -p [database_name] < [filename].sql
  3. Run the following command to roll back to the previous version.

    For example:

    /opt/unravel/versions/4.7.9.2.2048/setup --config /opt/unravel/data/conf/unravel.yaml
  4. Start Unravel.

    <Unravel installation directory>/unravel/manager start