Putty SSH settings to stop garbled output

Using ubuntu 18 and tools like glances and iftop would often mangle the output Changing the default Puttty settings ‘Connection > Data > ‘Terminal-type string’ to ‘putty’ instead of ‘xterm’ and setting your PuTTY settings under Translation and ensure that you have UTF-8 set as the character set then save this as the default profile […]

Read More »

MYSQL Backup to S3 script

Script #!/bin/bash # Set the enviroment variable so read function knows to seperate on “,”. export IFS=”,” NOW=$(date +”%Y_%m_%d_%H_%M”) DATABASES_CONFIG_FILE=”/home/bfnadmin/databases.csv” S3_ENDPOINT=”https://my-s3-storage.com” S3_BUCKET=”s3://sql-backups” TEMP_BACKUP_DIR=”backups” while read HOST USERNAME PASSWORD DB_SRV DB_NAME; do echo “[$DB_SRV – $DB_NAME]” mysqldump –single-transaction –quick –lock-tables=false \ -h $HOST \ -u $USERNAME \ -p$PASSWORD \ $DB_NAME | gzip > $TEMP_BACKUP_DIR/$DB_SRV-$DB_NAME-$NOW.sql.gz echo “Uploading […]

Read More »