You need to change the storage you are using, how to do that in a way so you don’t loose your data, lightning channels, blockchain and Umbrel doesn’t yell at you?
You want to upgrade from a 1TB SSD to a 2TB nvme?
You want to move from a failing SSD to a brand new one?
Your new SSD is slightly smaller than the original one, making it impossible/hard to clone using clonezilla or other softwares?
This guide will work for all of them!
Notice! You are going to need a live linux image in order to make it work just make sure does contain GParted
that will make your life way easier.
-
First we need to understand how UmbrelOS storage works after UmbrelOSv1.0:
A typical Umbrel installation on x86_64 arch, will create 4 partitions:- ~200MB ESP boot partition
- ~10GB OS partitionA
- ~10GB OS partitionB
- ~(whatever the remaining) data partition
Important: Those two OS partitions are used for OTA updates, and they will mostly replaced each time you update your UmbrelOS, they are DESIGNED to be separated from data partition.
So:
We only need to take car of data partition!
Let’s break down the steps:
- Take out your old storage, insert the new one and install UmbrelOS on your new disk/SSD/nvme. This will create all the needed partitions on your new disk. You can go ahead, create an account and login to it to make sure it works (don’t install any application).
- Connect your old and new disk to a computer and boot any live Linux image.
- Open the terminal and run
lsblk
to make sure you have two disks, then usegparted
(or any other software) to see which disk contains data on 4th (data) partition (In Figure1, you can easily see that /dev/nvme0n1p4 is half full, showing that is the source disk), spend as much time as needed here to be 100% sure which one is yoursource
and which one is yourdestination
disk!!
Let’s say our source is
/dev/sda4
and our destination is/dev/nvme0n1p4
- Mount source and destination partitions:
sudo mkdir /mnt/source
sudo mkdir /mnt/destination
sudo mount /dev/sda4 /mnt/source
sudo mount /dev/nvme0n1p4 /mnt/source
- Verify your source and destination again, yes, AGAIN!
ls /mnt/source/umbrel-os/home/umbrel/umbrel/app-data/
You should see all your installed applications here (Figure3).
Do the same thing for your destination. - Now we are going to
rsync
with-aAXv
to carefully clone data partition files with all their permissions and attributes:
7.1. We are not in a hurry so why not check what is going to happen? So first we use --dry-run
to make sure everything is fine:
sudo rsync -aAXv --delete --info=progress2 --dry-run /mnt/source/ /mnt/destination/
7.2. If everything is fine we do the next step, running the actual command:
ATTENTION! This will delete everything on /mnt/destination/ !
Important! Do not forget to put the “/” at the end of each folder! /mnt/source or /mnt/destination can lead to problems!
sudo rsync -aAXv --delete --info=progress2 /mnt/source/ /mnt/destination/
It will take some time (Specially if you have the entire blockchain) so let it do its thing.
7.3. Now, you guessed it! We verify it again, using checksum for a final integrity check!
sudo rsync -aAXv --delete --checksum --info=progress2 --log-file=/tmp/rsync-errors.log /mnt/source/ /mnt/destination/
Important! Check for any error when the final check finishes, you can also check the log file created at
/tmp/rsync-erros.log
7.4. Unmount the partitions:
sudo umount /dev/sda4 /mnt/source
sudo umount /dev/nvme0n1p4 /mnt/source
7.5. Turn off the computer.
- Now only put the new disk/ssd/nvme on your computer and turn it on, Voila! Everything should be there! Congratulations!
Enjoy <3