Friday 13 June 2014

DLINK NAS - Free SMS notifications UKONLY

  • Register at http://www.smspi.co.uk and get your hash.
  • Log into the NAS Web UI (i.e. enter the DNS-345 IP address in a browser)
  • Navigate to Management > System Management > Notifications
  • Expand SMS Settings
  • Check the Enable SMS Notifications checkbox
  • Click Add next to SMS service provider
  • Welcome: Click Next
  • Step 1: Enter a name of your choice in Provider Name and copy the following URL into the SMS URLtextarea: http://www.smspi.co.uk/api/?to=Phone_number&message=Message_content&hash=what ever your hash is
  • Click Next
  • Step 2: Next to each URL variable, select the following options from the appropriate dropdown menus:
    • user=Username = Username
    • password=Password = Password
    • api_id=Other = Other
    • to=Phone_number = Phone number
    • text=Message_content = Message content
  • Click on Finish
  • Enter your mobile phone number into the field next to Phone number1((to)).
  • Click Test SMS and the NAS will display an affirmation message if the settings are correct and you will receive an SMS
  • Click Save Settings

Monday 2 June 2014

Mysql Backup to Dropbox

Go to the following link to download the scripts:https://github.com/txt3rob/Dropbox-Mysql-Upload

Mysql Backup To Dropbox

This script you will need to run once manually to link to your dropbox folder.
To Run
chmod 777 backupsql.sh
./backupsql.sh
Once it's confirmed working then add it to the crontab.
Dropbox uploader script originally from - https://github.com/andreafabrizi/Dropbox-Uploader/
You will need to alter the following in backupsql.sh

MYSQLUSERNAME="USERNAME"
MYSQLPASSWORD="PASSWORD"
BACKUPPATH="/LOCALPATH/$TIMESTAMP"
DATABASE="DATABASE NAME"
DROPBOXPATH="/PATH ON DROPBOX/"

It's set to delete files older than 5 days.
You can alter this by changing the following line:
dropbox_uploader.sh delete $DROPBOXPATH/mysql_db_backup-`date +%d-%m-%y-%H --date 'now -5 days'`.bz2
For adding to the crontab you can easily use the following site to generate how often you wish for it to run
http://www.easycron.com/generator/crontab
All should be easy to work out.
Any issues please email me txt3rob@gmail.com

Amazon

Donate

Donate Towards More Raspberry PI's for Projects