getumbrel / umbrel

A beautiful home server OS for self-hosting with an app store. Buy a pre-built Umbrel Home with umbrelOS, or install on a Raspberry Pi or any x86 system.
https://umbrel.com
Other
7.46k stars 533 forks source link

Backup LNbits docker #636

Open Darth-Coin opened 3 years ago

Darth-Coin commented 3 years ago

Can we have a way to make backup of the entire docker of LNbits? I think that will be the easiest way to have a backup of the entire app. Like we have the button to save LN channels, but one for the whole LNbits docker repository and then a way to recover it when the node is re-constructed.

AaronDewes commented 3 years ago

No, the data isn't in the docker container itself, but in app-data/lnbits. The docker container only contains the main LNBits app, not its data

Darth-Coin commented 3 years ago

OK, then having a backup/restore tool for this will be very handy. I will not start putting funds into something that I can't restore easily. You can't say to a total noob (ex. a restaurant owner) that just use LNbits app, to dig up into the belly of the beast to make beackups. All these LN solutions, if doesn't have simple interface for normies, it will not be used. So we are losing time with them.

lukechilds commented 3 years ago

You can't say to a total noob (ex. a restaurant owner) that just use LNbits app, to dig up into the belly of the beast to make beackups.

Completely agree @Darth-Coin, great insight! To be clear, we don't have a simple solution to backup/restore apps yet, it is 100% on the roadmap for the exact reasons you raised.

Also, just fYI, in the specific case of LNbits, it just piggy backs on the main LND instance. So if you have your LND channel backups, that includes all of your LNbits funds too. Although of course tht doesn't include the LNbits specific accounting information so in the event of recovery you'd restore the funds but wouldn't know which LNbits wallets they came from.

downet commented 3 years ago

I understand, that it´s not that easy, but if you really want to backup lnbits, you can use following command: tar czf ~/lnbits-backup-$(date +%Y%m%d).tar.gz /mnt/data/umbrel/app-data/lnbits/data/

Which will create lnbits-backup-20210314.tar.gz in umbrel home directory. Then you can download it with WinSCP towards you computer. I know.. it´s not the best, but giving it here in case someone wants to do it at least somehow :)

If you want to automate it, just add to crontab (crontab -e) following and it will be automatically backuped every night at midnight: 0 0 * * * tar czf ~/lnbits-backup-$(date +%Y%m%d).tar.gz /mnt/data/umbrel/app-data/lnbits/data/ > /dev/null 2>&1

Darth-Coin commented 3 years ago

@downet Is that procedure also having success with restoring? If I have a backup that doesn't restore the data and the funds, in the same way, then is useless. @lukechilds thanks for the answer. I know that we are still in the early phase and I post this request, just to be taken in consideration for the future versions. I am playing here the role of an end user, a simple merchant that want to use these solutions for his shop. An end user that have no idea about linux commands and stuff like that, just simple buttons on a interface. People like that love dumb buttons :)