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