Skip to content

2naive/GIT-MySQL-Backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

INSTALLATION

git clone https://github.com/2naive/GIT-MySQL-Backup.git
(crontab -l ; echo "30 04 * * * /bin/bash /path/to/GIT-MySQL-Backup/backup.sh /path/to/MYSQL-BACKUPS MYSQL-USER MYSQL-PASS MYSQL-DB")| crontab -

GIT CONFIGURATION

Git should be configured in backups directory. To prevent asking for password when using git push command use e.g.:

git add remote origin https://login:password@bitbucket.org/login/repo.git

or fix .git/config:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = https://login:password@bitbucket.org/login/repo.git

###USAGE ./backup.sh /path/to/backup mysql_user mysql_pass mysql_db

About

Backup MySQL database to GIT repository using Cron

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages