So, I thought I would make this post in order to inform people how you would back up your entire Lightning Network state using LND. LND seems to be the market leader here; I haven't seen anyone outside of Blockstream use c-lightning (CMIIW).
So, there are two parts to an LND backup - the mnemonic phrase itself and the channel state.
The mnemonic phrase part should be familiar to most of you. It is just a regular 24-word BIP39 phrase. LND calls it an "aezeed". It allows you to restore all of the on-chain funds - pending a re-scan of course.
There is usually only one phrase per LND installation; it is created when you run
lncli create for the first time.
The other thing you need to know about is something called a static channel backup. It is a file that contains the state of a channel that you have open with another node.
According to the LND documentation at:
https://docs.lightning.engineering/lightning-network-tools/lnd/recovery-planning-for-failure#static-channel-backups-scb:
To obtain our SCBs, we can use the channel.backup file found in .lnd/data/chain/bitcoin/channel.backup. This file contains all backups for all our currently existing channels and it is updated every time we or somebody else opens a new channel. We can also obtain the SCB for a specific channel with the command lncli exportchanbackup --chan_point <channel point>
Keep a copy of your channel.backup file on a separate machine and update it whenever a new channel is opened between your node and a peer.
Where the channel point is just a UTXO (written in txid:index format) that represents an open channel of yours.
So if you back up your static channel backup files and your mnemonic phrase, then you will always have access to your funds even if your LND node is destroyed; you just have to create it again and then use the static channel backups to cooperative-close your channels.
Do note that your channel backups always have to be up-to-date. Don't forget to back up your channel after you send or receive some sats, otherwise if you try to close a channel with this invalid state, it is seen as a malicious close attempt and you will lose your off-chain balance. See
https://bitcoin.stackexchange.com/a/80399 for details.