AustinLeath
User since Nov 17, 2022
86 Posts
Recent Posts
#!/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>&1nowdate=$(date -u)# OPTIONSWEBHOOK="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 $LOGFILEcurl --data "content=$SERVERNAME started a backup - $nowdate" $WEBHOOK | tee -a $LOGFILE && echo "" >> $LOGFILEif pidof -o %PPID -x "backup.sh"thenecho "Failed backup attempt on $SERVERNAME - $nowdate (rclone already running)" | tee -a $LOGFILEcurl --data "content=Failed backup attempt on $SERVERNAME - $nowdate (rclone already running)" $WEBHOOK | tee -a $LOGFILEexit 1firclone sync $FROM $TO -P --b2-hard-delete --stats 5s --progress | sed 's/Transferred:/\n\nTransferred:/' | tee -a $LOGFILEenddate=$(date -u)endtime=$(date +'%T')echo "Completed backup on $SERVERNAME - $enddate" | tee -a $LOGFILEcurl -F "content=Completed backup on $SERVERNAME - $enddate" -F upload=@"$LOGFILE" $WEBHOOK | tee -a $LOGFILEif [ -f $LOGFILE ]thenrm $LOGFILEfi
CLIENT_VPN_ID="cvpn-endpoint-xxxxxxxxxxxx"for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); doecho "Searching in region: $region"aws ec2 describe-client-vpn-endpoints --region $region --query "ClientVpnEndpoints[?ClientVpnEndpointId=='$CLIENT_VPN_ID']" --output tabledone
program HelloWorld;beginwriteln('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
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
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.