https://github.com/2naive/git-mysql-backup
Backup MySQL database to GIT repository using Cron
https://github.com/2naive/git-mysql-backup
Last synced: about 1 year ago
JSON representation
Backup MySQL database to GIT repository using Cron
- Host: GitHub
- URL: https://github.com/2naive/git-mysql-backup
- Owner: 2naive
- Created: 2013-12-04T03:02:42.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-24T18:18:16.000Z (over 12 years ago)
- Last Synced: 2025-01-16T07:54:36.992Z (over 1 year ago)
- Language: Shell
- Size: 133 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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