Shell script to backup database and send it to remote server automatically

This article explains how to create a database backup script to send the backup to remote server  without any manual intervention. For security reasons or to enable disaster recovery it is important to keep database backup copies on some additional server outside your network. The process to create a script for database backup and to autosend it to a remote server is not really so complicated as many would think. To make it simpler let's divide the whole task in 3 different sub tasks Create a backup file of your database. Authorize the origin server i.e. Your current server to send the files to the remote server (So that the remove server knows that it is receiving the files from a genuine source) Create a script to simply SCP the files from the origin server to the remove server Above mentioned are mandatory steps. Additionally you may also want to create a log file to log the status of every step just in...
Read More