Skip to content

Instantly share code, notes, and snippets.

@ahmadsoe
ahmadsoe / backup_mysql.sh
Created December 24, 2013 21:14
Backup MySQL database(s) to local or remote server.
#!/bin/bash
# Backup MySQL database(s) to local and/or remote server.
# databases=( 'DB_1' 'DB_2' 'DB_3')
databases=( )
db_host="localhost"
db_user=""
db_pass=""
#!/bin/bash
echo "Enter the name of the domain you wish to create"
read a
echo "Create DocumentRoot directory..."
if [ ! -d /var/www/$a ]; then
mkdir -p /var/www/$a/public_html
mkdir -p /var/www/$a/logs