Skip to content

schnoog/mydumper-backup-and-restore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MyDumper Backup and Restore Scripts

Collection of backup scripts (sometimes just wrapers) for MySQL.

Tools to enhance the MySQL Backup experience and make it easier (almost plug and play...almost!)

Source: mydumper.sh

Why mydumper and not only mysqldump ?

Mydumper is "a little bit" faster. At least accoding to my experience.

My test case is a bunch of databases (/var/lib/mysql size is 5.8GB)

  • mydumper.sh script: 71 seconds
  • mysqldump --all-databases | gzip -1 > all_dbs.sql.gz : 117 seconds

The script takes care of the retention policy (defined by the user), as followed:

  • For MyDumper: User will define weekly and daily retention times.

MyDumper backup

mydumper.sh Bash script used as a wraper of the MyDumper backup tool. Run this script as a daily cronjob

Mysqldump backup

mydumper_restore.sh

Bash script that restores backups generated with mydumper

Expects 2 arguments:

  1. Backup-point
  2. Databasename (or all)
  • running it without arguments will show available backup-points
  • running it with a valid backup-point argument but without database name will output all available database backups

Example (restores backup for the database "ticket" from April 19th 2021):

./mydumper_restore.sh 20210419 ticket

Configuration

config.sh Set the backup path , the retention time and mysql user.

Releases

No releases published

Packages

No packages published

Languages