Skip to main content

Recent Posts

BackBlaze Backup Script

Dec 23, 2024AustinLeath

0 likes • 16 views

#!/bin/bash
# RCLONE BACKUP SCRIPT (using ionice)
# Type crontab -e and copy the line below without the #
# 0 0 * * * ionice -c 3 /home/owner/backup.sh >/dev/null 2>&1
nowdate=$(date -u)
# OPTIONS
WEBHOOK="YOUR_DISCORD_WEBHOOK_LINK_HERE"
LOGFILE="/root/backup.log"
FROM="/path/where/you/backup/from"
TO="backblaze:BucketName/FolderName"
SERVERNAME="Server Name"
echo "$SERVERNAME started a backup - $nowdate" | tee -a $LOGFILE
curl --data "content=$SERVERNAME started a backup - $nowdate" $WEBHOOK | tee -a $LOGFILE && echo "" >> $LOGFILE
if pidof -o %PPID -x "backup.sh"
then
echo "Failed backup attempt on $SERVERNAME - $nowdate (rclone already running)" | tee -a $LOGFILE
curl --data "content=Failed backup attempt on $SERVERNAME - $nowdate (rclone already running)" $WEBHOOK | tee -a $LOGFILE
exit 1
fi
rclone sync $FROM $TO -P --b2-hard-delete --stats 5s --progress | sed 's/Transferred:/\n\nTransferred:/' | tee -a $LOGFILE
enddate=$(date -u)
endtime=$(date +'%T')
echo "Completed backup on $SERVERNAME - $enddate" | tee -a $LOGFILE
curl -F "content=Completed backup on $SERVERNAME - $enddate" -F upload=@"$LOGFILE" $WEBHOOK | tee -a $LOGFILE
if [ -f $LOGFILE ]
then
rm $LOGFILE
fi

AWS CLI Locate ClientVPN

Sep 23, 2024AustinLeath

0 likes • 5 views

CLIENT_VPN_ID="cvpn-endpoint-xxxxxxxxxxxx"
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
echo "Searching in region: $region"
aws ec2 describe-client-vpn-endpoints --region $region --query "ClientVpnEndpoints[?ClientVpnEndpointId=='$CLIENT_VPN_ID']" --output table
done

Untitled

Sep 19, 2024AustinLeath

0 likes • 2 views

program HelloWorld;
begin
writeln('Hello, World!');
end.

Post Statistics

Posts

No Posts Found

It looks like AustinLeath has no public posts

Likes

Please Log In

You must be authenticated to view a user's likes

Shared

Please Log In

You must be authenticated to view a user's shared posts

Profile Privacy

Multi-Factor Authentication

Multi-Factor Authentication (MFA) is an authentication method that requires you to provide two or more verification factors to gain access to your account. In addition to username and password, MFA requires you to verify your email on every login, which decreases the likelihood of someone stealing your account.

Change Password

Forgot Password?

Identity Color

Changes the color of your profile icon and cursor highlight in the live code editor. You and other users will be able to view this change.

Delete Account

Deleting your account is permanent. All data associated with your account will be lost.