Hi,
I need to upgrade mysql ,so I need to backup all my database .Is there any bash script for backup all my database for cpanel server?
how to take all mysql database backup using script?
Fully Managed Backup Services @ Affordable prices
Re: how to take all mysql database backup using script?
Use the below script to take backup of all databases on the server.
mkdir /home/mysqldump
cd /home/mysqldump
root@server [~]# vi db-backup.sh
#!/bin/sh
for i in `mysql -e'show databases' | grep -v 'Database\|performance_schema\|information_schema'` ;
do
mysqldump $i > /home/mysqldump/$i.sql
done
=============================
Martin
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree
mkdir /home/mysqldump
cd /home/mysqldump
root@server [~]# vi db-backup.sh
#!/bin/sh
for i in `mysql -e'show databases' | grep -v 'Database\|performance_schema\|information_schema'` ;
do
mysqldump $i > /home/mysqldump/$i.sql
done
=============================
Martin
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree