Skip to content

A bash script to store databases in separate files with daily, weekly and monthly rotation

Notifications You must be signed in to change notification settings

vicxyz1/mysqlbackup

This branch is 7 commits ahead of, 6 commits behind rmtsrc/mysqlbackup:master.

Repository files navigation

MySQL database backup

A bash script to store databases in separate files with daily, weekly and monthly rotation.

Usage

./mysqlbackup.sh

Configuration (optional)

Copy mysqlbackup.sample.conf to: mysqlbackup.conf and customise as necessary.

Background

Normally using:

mysqldump --all-databases

Means that all databases are backed up into one massive single file; so it makes it a little bit tricky to pull out individual databases.

This is based on MySQL backup bash script will automatically separate out the databases into their own files making it a lot easier to manage.

The mysqldump command has been customised to be more reliable (handling UTF-8, stored procedures, not breaking foreign key indexes etc.) and the ability to handle multiple config files. It can also automatically rotate archive backups for x number of months, weeks and days.

About

A bash script to store databases in separate files with daily, weekly and monthly rotation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%