0
I Use This!
Activity Not Available

Project Summary

Latest update: Nov 28 2007 ( patch submitted by Cyril Mougel)

fixed : ar-backup not working properly when the OS isn't in English (svn issues) fixed : can't create a backup folder on windows when the revision isn't defined enhanced : speed has been improved since we are now parsing the local svn files.

Active Record backup is a Rails plugin which lets you backup your database schema and content in a schema.rb file and fixtures.

Backups are organized by environments and SVN revision.

ar-backup is compatible with sake http://errtheblog.com/post/6069
To install in Rails:

Rails script:

ruby script/plugin install http://ar-backup.googlecode.com/svn/ar-backup

Piston:

piston import http://ar-backup.googlecode.com/svn/ar-backup vendor/plugins/ar-backup

SVN:

svn co http://ar-backup.googlecode.com/svn/ar-backup vendor/plugins/ar-backup

Sake:

sake -i http://ar-backup.googlecode.com/svn/ar-backup/tasks/ar_backup_tasks.sake

Prerequisites:Your project must be under subversion
Usage:rake backup:db:dump # create a backup folder containing your db schema and content data (see backup/{env}/build{build number})

rake backup:db:extract_content # Create YAML fixtures from your DB content

rake backup:db:extract_schema # Dump the db schema

rake backup:db:load # load your backed up data from a previous build. rake backup:db:load BUILD=1182 or rake backup:db:load BUILD=1182 DUMP_ENV=production

Backup your database content and schema. (development environment)
rake backup:db:dump
Do the same thing but with the production environment (note that the previous backup won't be overwritten)
RAILS_ENV=production rake backup:db:dump
Restore the database content and schema backed up under BUILD=2547
rake backup:db:load BUILD=2547
Restore the production database backup into our development db
rake backup:db:load BUILD=2547 DUMP_ENV=production
Capistrano 2 usage example(you first need to create a backup folder)

set :backup_dir, "#{deploy_to}/backup"
before :deploy do
db.backup
db.move_backup
end
namespace :db do
desc 'create the production database'
task :create do
run "cd #{current_release} && rake db:create RAILS_ENV=production"
end
desc 'dump the database schema and content'
task :backup do
run "cd #{current_release} && rake backup:db:dump RAILS_ENV=production"
end
desc 'timestamp the backup file'
task :move_backup do
run "cd #{current_release} && mv backup/production #{backup_dir}/production#{Time.now.strftime("%Y-%m-%d%H-%M")}"
end
end

Tags

aimonetti backup database fixtures plugin rails ruby sake

In a Nutshell, ar-backup...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

MIT License
Permitted

Sub-License

Private Use

Commercial Use

Modify

Distribute

Forbidden

Hold Liable

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    anyone with an Open Hub account can update a project's tags
  • ...
    55% of companies leverage OSS for production infrastructure
  • ...
    you can subscribe to e-mail newsletters to receive update from the Open Hub blog

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis