Skip to content

bovidiu/sql-database-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

MySQL Database Backup

This script will backup your database and submit it to GitHub, on the assumption that your Github is set over SSH.

The script has been build on python version 2.7.3 .

Dependencies

You are required to install python on your machine, also install MySQLdb module for python.

Structure

When the script will run it will create some folders as follows:

  • One folder named backup
  • Inside the folder backup it will be create a current day folder ie: 20150605
  • Inside the current day folder it will be create a folder with each database which will contain an sql.gzip file

##Configure

Open the file osb_backup.py to edit.

Change:

sqlHost = 'localhost';

sqlUser = 'username';

sqlPsw = 'password';

path = "/var/www";

with your settings.

Save the file and you are done!

Run it!

In the terminal type:
./osb_backup.py

About

Automatic backup script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages