Recreate an instance, preserve data

This page:

Sometimes you need to recreate your instance from scratch, but want to preserve your data so that you don't have to upload it again from another source. These instructions help with just that. If you encounter any problems when following these instructions, please submit a support ticket through our Support Portal or an email to help@pawsey.org.au.

Data on a Data Volume


You should use a data volume with any instance that has associated data. Our training pages have instructions on creating and managing data volumes.

Before proceeding, move any other material you wish to keep (e.g. configuration information, notes) to your data volume, with a command like this:

mv -i my-cofiguration-file.txt /scratch/

Shut Off your instance


Firstly, turn off your instance. There are two ways to do this:

  1. From the Nimbus dashboard, click the instance menu then Shut Off Instance
  2. While logged in to the instance, type:

    $ sudo halt -p

Once the Instances page shows that your instance has Power State Shut Down you can proceed.

Launch New Instance


Launch a new instance in the usual way (e.g. by following the training pages). Log in to the instance via SSH.

Reattach and Mount Storage Volume


From the Volumes page you will see your data volume is connected to your old instance, most likely as device /dev/sdc. Perform all of these actions from the Nimbus dashboard:

  • Click the volume menu and Manage Attachments.
  • Click Detach Volume.
  • Read the popup dialogue, then click Detach Volume to confirm.
  • Click the volume menu and Manage Attachments again.
  • From the Attach to Instance drop-down menu, select the name of your new instance.
  • Click Attach Volume.
  • You will see that it is now connected to your new instance, most likely as device /dev/sdc.

Now that your data volume is attached to your new instance, you can mount the filesystem. Perform these steps, just like in the training pages:

  • (warning) Note: Do not follow the instructions on how to format and create a filesystem on the volume. You did this already!
  • Log in to your instance via SSH
  • Make a directory to mount the data volume filesystem, then mount the filesystem like you did on your previous instance:

    • Remember, the UUID below is just an example; substitute in your own data volume's UUID.

      $ sudo mkdir /scratch
      $ sudo blkid
      $ sudo mount UUID="b88679ef-61b3-49e7-baaa-0093a6211259" /scratch

Your data should now be available within the /scratch mountpoint.

Delete Old Instance


Once you have done all of the above and can see your data on the new instance, you can safely delete your old instance.

  • From the Instances page, click the old instance's menu
  • Click Delete Instance.
  • Read the warning, then click Delete Instance again to confirm.

Your instance is now deleted.