This Bash script is to automatically backup your database itself. An example a maybe a database cluster that contains a lot og databases. This scripts backups individual databases in the specified database cluster.
This is in two forms
- Local backup: Backups your local database and copies sql files to s3 bucket.
- Online backup: Backups the online database and copies sql files to s3 bucket.
- Clone project
$ git clone https://github.com/CyrilBaah/database-backupScript.git
- Change directory to the current working directory
- Configure .env.example to .env with correct details
- Install AWS CLI
- Configure AWS CLI with
$ aws configure
- Make the script executable depending on the your preference
$ chmod +x local_db_backup.sh
Or
$ chmod +x online_db_backup.sh