Backup html folder, backup SQL Database and download locally

From rbachwiki
Revision as of 13:28, 15 June 2023 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Master Script

echo "-----------------------------------"
echo ""
echo "++++++++++ Running backup script, zipping dir and dump sql database ++++++++++"
echo ""
clientscripts/./client_run_backup_sql_zip.sh

sleep 5
echo "-----------------------------------"
echo ""
echo "++++++++++ Download zip and sql files and copy to synology ++++++++++"
echo ""
echo ""
clientscripts/./client_dlzipsql_cpto_synology.sh

sleep 5
echo "-----------------------------------"
echo ""
echo "++++++++++ Delete zip and sql files on server ++++++++++"
echo ""
echo ""

clientscripts/./client_delete_zipsql.sh

echo "-----------------------------------"
echo ""
echo "++++++++++ All scripts ran ++++++++++"
echo ""
echo ""
  • client_run_backup_sql_zip.sh

#!/bin/bash

ssh -i ~/.ssh/linode  root@45.33.91.146 /var/www/scripts/html_backup.sh
echo ""
echo ""
echo "++++++++++++++++++ Finished running html backup script ++++++++++++++++"
echo ""

sleep 10

echo ""
echo "+++++++++++Running SQL Backup script ++++++"
ssh -i ~/.ssh/linode  root@45.33.91.146 /var/www/scripts/sql_backup.sh
echo ""
echo "+++++++++++++ Finish running SQL Backup script +++++++++++++++++"