Run this on a cron job on your node and thank me later

#!/bin/bash

# Define variables

TIMESTAMP=$(date +"%b%d%Y_%I%M%p")

BACKUP_FILE="channel_backup_$TIMESTAMP.backup"

S3_BUCKET="your-s3-bucket-name"

S3_PATH="s3://$S3_BUCKET/$BACKUP_FILE"

# Export the channel backup

lncli --network signet exportchanbackup --all --output_file $BACKUP_FILE

# Upload the backup to Amazon S3

aws s3 cp $BACKUP_FILE $S3_PATH

# Clean up the local backup file

rm $BACKUP_FILE

Reply to this note

Please Login to reply.

Discussion

While this seems like a good one, probably shouldn't have people just run random bash scripts they see on nostr.

πŸ˜‚πŸ˜‚πŸ˜‚

And here we see the utility & importance of code literacy

And, that’s why I read the comments before acting. Thank you.

mmmm first lets make it an agnostic #!/bin/sh then make it cp into a gpg encrypted pass file then git push the password-store repository and now is gone encrypted on all device that git pull the password-store repo and have the gpg to decrypt it

Why would I backup my signet channels

And whoever reads this, obviously don't run random commands, that's a great way to get rekt.

Just so nobody accuses me of putting malicious code, I believe he means in general, the script I gave above absolutely will not get you rekt, it just does a channel backup and sends to your own s3 bucket that you preconfigured

Yes. I am not accusing at all. It'd clearly just a backup to the cloud.

But a general rule of thumb for folks...

Because you are hosting a production sandbox for your clients!

I'm not

Oh right that's me