Skip to content

Simple Ruby script to backup a MySql database to Subversion

Notifications You must be signed in to change notification settings

niryariv/dbbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

NAME
	dbbackup -- back up a MySQL database in a Rails environment.

SYNOPSIS
	dbbackup <environment> [--mysqldump-path=</full/path/to/mysqldump>] [--no-gzip] [--no-svn]

DESCRIPTION
    By default, dbbackup gets the DB info from config/database.yml, dumps and gzips it into "<Rails Root>/db/dump_<environment>.sql.gz",
	and	adds/commits that to Subversion.
	
	
	The following parameters are available:
	<environment> 			Required, must be defined in config/database.yml
	--mysqldump-path=		If mysqldump isn't in PATH or has a different name than "mysqldump" (eg, some OS X installs use "mysqldump5")
	--no-gzip				Don't gzip the output file
	--no-svn				Don't commit the output file to Subversion			
	
EXAMPLES
	Create 'db/dump_production.sql.gz' and commit it to Subversion (if it's a new file, add it to Subversion and then commit)
		
		dbbackup production		

	Create 'db/dump_development.sql' (not zipped) and don't commit to Subversion. Use mysqldump at /usr/local/mysql/bin/mysqldump
	
		dbbackup development --mysqldump-path=/usr/local/mysql/bin/mysqldump --no-gzip --no-svn
							

About

Simple Ruby script to backup a MySql database to Subversion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published