Web Designing Company Singapore, Web Hosting Company, Custom Software Applications, eCommerce websites

Web Designing Company Singapore, Web Hosting Company, Custom Software Applications, eCommerce websites

BACKUP ALL MYSQL DATABASES COMPRESS SINGLE SCRIPT [SOLVED]

How to do backup ubuntu server's all the mysql databases single script [Solved] enter image description here

Here the simple intro, how my script works. Please read the script fully before you execute. Actually there is no harm there but you have to do what you doing..

  • backup each mysql db into a different file, rather than one big file
  • as with --all-databases. This will make restores easier.
  • To backup a single database simply add the db name as a parameter (or multiple dbs)
  • mkdir -p /vv_files/backups
  • useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
  • Remember to make the script executable, and unreadable by others
  • chown -R mysql-backup:backup /var/backups/mysql
  • chmod u=rwx,g=rx,o= /var/backups/mysql/dump.sh
  • crontab entry - backup every 6 hours
  • sudo crontab -e [ set your desired timing. 6 hrs is safer for sysadmins]

- Download the script file from our GITHUB VVCARES