How can I backup my umbrel node?

Since all disks will fail at some point in the future, I wonder what is the recommended backup procedure for an umbrel node.

Would you recommend to commit and save the docker images to an external harddisk, or would you rather create a filesystem snapshot of the umbrel filesystem (provided there is some leftover storage in the volume group) and make a (i.e. borg) backup of the read-only mounted snapshot?

It would be nice not to interrupt the running umbrel node during backup, and to have an easy procedure to restore all the data (blockchain, lightning channels, and all other data) on a freshly setup umbrel node.

2 Likes

Hi @raphae1

We have an app solution for this in the works!
But for the moment my recommended solution is running

sudo ~/umbrel/scripts/stop && tar -cvzf umbrel_backup.tar.gz ~/umbrel/

after SSHing into your Umbrel
then exit

scp umbrel@umbrel.local:/home/umbrel/umbrel/umbrel_backup.tar.gz /local/path/

To export it to another device (/local/path/ will be different for you)

3 Likes

Thanks a lot.
I am now doing

DATE=`date '+%Y%m%d%H%M%S'`
BACKUP_ROOT=borglogin@backupserver:/remote/directory/umbrelbackup
MOUNTPOINT="/media/umbrel"

${MOUNTPOINT}/scripts/stop \
       &&  /bin/sync -f ${MOUNTPOINT}/  \
       &&  /sbin/lvcreate --size 10g --snapshot --name umbrelsnap /dev/ubuntu-vg/umbrel \
       && ${MOUNTPOINT}/scripts/start \
       &&  /bin/mount -r /dev/ubuntu-vg/umbrelsnap /media/umbrelsnap  \
       && echo umbrelsnap successfully mounted
       
/usr/bin/borg create -x --compression lz4 -s --exclude=/media/umbrelsnap/app-data/bitcoin/data/bitcoin/blocks \
                                             --exclude=/media/umbrelsnap/app-data/bitcoin/data/bitcoin/chainstate \
                                             --exclude=/media/umbrelsnap/app-data/bitcoin/data/bitcoin/indexes \
                                        ${BACKUP_ROOT}::auto_${DATE} /media/umbrelsnap

/bin/umount /media/umbrelsnap
/sbin/lvremove -f /dev/ubuntu-vg/umbrelsnap  && echo umbrelsnap removed

Which will only cause a very short downtime of umbrel (esp LND), because it only has to create a LVM snapshot and restarts immediately again. After the restart, I mount the snapshot and back it up (which takes less than minute without the blockchain, but could last a lot longer otherwise).

@smolgrrr any update on the backup app? would be really great to have this.

2 Likes

Bumping this question. Imho this is the single most important gap versus start9. Backups are critical. If I understand correctly, currently any pleb who cannot do CLI commands will lose everything except their LND node in the case of a drive failure. So if you’re running Core Lightning for instance and don’t know how to manually backup the hsm secret via CLI your lightning balance and state will be lost forever if your Umbrel dies.

1 Like

Ironic that the platform that has a ‘backup your mac’ app doesn’t back itself up at all. I’d also like to see this, and have been asking for a simplified GUI (be it text or otherwise) to save an image over the network to my NAS or an external USB drive.

1 Like

Trying to help:
I’ll offer a 200k sats bounty for a community contributor* to submit a PR with safe working code for a GUI based backup to an external USB drive.
*By community contributor I mean only someone who doesn’t work for Umbrel as they should’ve done this years ago, and I refuse to pay them to do this. I will only pay people who don’t work for Umbrel.

So if I am understaning you correctly you would rather:

  1. pay any person other than the developers whose products you’ve been using for free this whole time and

  2. have a solution that is not fully integrated into the OS but installed via app store so that it needs constant maintenance and might potentially break when the random person leaves the project?

We might need to think about this problem a bit harder I guess. While I value your contribution I would personally rather backup via CLI before it is being integrated into the OS.

Your criticism is fair and I wholly accept it. For context I purchased a Home so I have attempted to contribute to devs. This is on me but when I purchased the product I thought this was included and was disappointed when it was not. Not saying that’s fair but just my perspective. I’d be willing be reconsider if you see a better course.

Oh, I forgot about the Home… so then my first point is not valid here of course. And I fully understand your frustration then!

I see we might need to just wait or make a full-disk images or in the vase of virtual machines doing image snapshots once in a while.

The first option might also be possible on the home, whether you can have physical access to the drive or not. But especially with the Pi5 it should be really easy to do, since it can now also boot from a usb or nvme drive.