.. _recover-02x:

===================================
Migrate Embassy from Versions 0.2.x
===================================

.. contents::
   :depth: 4
   :local:

Migrate Embassy Series 0.2.x Data
---------------------------------

This guide will cover how to upgrade from EmbassyOS version 0.2.x to version 0.3.0.

If you purchased the upgrade kit from us you can skip to :ref:`backing up <recover-02-backup>` unless you received your kit before we completed 0.3.0, in which case please skip to :ref:`flashing <recover-02-flashing>` as you will need to flash 0.3.0 onto your SD card to continue migrating.

Additional Hardware
===================

If you have not purchased an `upgrade kit <https://store.start9.com/collections/embassy/products/upgrade-kit>`_ from us you'll need the following equipment:

#. `16GB microSD card <https://www.amazon.com/Sandisk-Ultra-Micro-UHS-I-Adapter/dp/B073K14CVB/>`_

#. `1TB solid state drive <https://www.amazon.com/Crucial-MX500-NAND-SATA-Internal/dp/B078211KBB>`_ minimum, 2TB+ recommended.

#. `Connector <https://www.amazon.com/Sabrent-2-5-Inch-Adapter-Optimized-EC-SSHD/dp/B011M8YACM/ref=sr_1_3?crid=IP9CVCE40BLN&keywords=usb+sabrent+ssd&qid=1640909042&sprefix=usb+sabrent+s%2Caps%2C192&sr=8-3>`_ or `enclosure <https://www.amazon.com/gp/product/B07T9D8F6C>`_ for your drive.

#. `SD card adapter <https://www.amazon.com/gp/product/B000WR3Z3A>`_ for getting data from your SD card.

Instructions
============

.. _recover-02-flashing:

Flashing
........

#. Once you have all these you will need to download an 0.3.0 image from https://images.start9.com. This is free for all existing users. Anyone who is running 0.2.x who compiled it themselves will need to either compile 0.3.0 themselves or purchase an 0.3.0 image.

#. Once you have the image, flash it on to the 16GB SD card - the new one, **NOT** the one currently in your Embassy!

.. tip:: The flashing software we recommend is `Balena Etcher <https://www.balena.io/etcher/>`_

.. _recover-02-backup:

Backing up
..........

.. caution:: It is prudent to back up your Embassy before migrating in case something doesn't work correctly, or there is an accident

If you're unsure how to do this - please follow `this <https://youtube.com/watch?v=_QJXgnE90ko>`_ guide.

.. youtube:: _QJXgnE90ko

With your Embassy safely backed up, it's time to proceed with the migration.

.. _recover-02-migrate:

Migration
.........

#. Begin by going into your Embassy, stopping all running services, and shutting down the device in the Embassy tab.

#. Once you've heard the power-off sound, wait a few more seconds and then safely unplug the Embassy.

#. Next, remove the SD card that is in your Embassy and place it into the SD card adaptor, and then connect the adaptor to a USB port on your Embassy.

#. Then take the new SD card with 0.3.0 on it and place it into the microSD card slot on your Embassy (not into the adaptor - that is for the old SD card!)

#. Next, plug the SSD into one of the USB 3.0 ports (blue) on your Embassy, then reconnect the Ethernet cable if not already connected.

#. Now the power cable can be connected and the Embassy powered up.

Power Up
........

#. The Embassy will power up and make a *bep* sound.  It will then initialize, a process of less than 5 minutes if you purchased an image, or about 10-20 minutes if you built from source. Once complete you will hear a *chime* sound.

#. On your computer, open up a browser and go to ``embassy.local``

#. You will be asked to enter a product key.  This can be located on the bottom of your Embassy if you purchased, or in the repository folder if you built from source.

#. Once entered, select ``Recover`` then select the microSD card - this will be labelled ``rootfs``.

#. On the next page you will be asked to select a storage device - here you should select your SSD.

.. note:: If it does not show up, please power down Embassy, unplug it, plug it back in, and boot Embassy again

#. If this drive is not empty, you will see a warning first. If you are happy to proceed, click ``Continue``.

#. You will now need to make a password for your Embassy. It needs to be a strong password. This password protects your Embassy. It can be the same one that you used prior to migration, or a different one.

#. The Embassy will now recover all your data from your old Embassy and once finished, you will hear <this>.

#. Now you will be provided with both a Tor and LAN address with which you can access your Embassy. Please make a note of these.

#. To use LAN safely, the SSL certificate will need to be added to whatever device you are using to access. This can be downloaded by clicking on ``Download root CA`` and installed by following the instructions <here>.

#. You can now log in to your Embassy via Tor or LAN, and you will be given the option of recovering your data on a service-by-service basis.

.. note:: For those recovering Bitwarden - it is now called Vaultwarden.
