Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rails-backup-migrate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rails-backup-migrate

  • 0.0.12
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

h1. Rails Backup Migrate

A gem that provides a rake task for backing up your database and uploaded files to an archive and restoring them from an archive.

You can archive schema, schema+data, files, or schema+data+files. Each archive action has a restore counterpart. The data from the database is backed up to a .yml file for each table that is database independent.

So you can use Rails Backup Migrate to get data out of one kind of database and easily load it into another kind.

h2. Quick Start

Installing the gem:

  $ gem install rails-backup-migrate

Add the following line to your rails application's Rakefile

  require 'rails-backup-migrate'

To backup everything in a rails instance:

  $ rake site:backup

Everything is saved in an archive file, named by default 'site-backup.tgz'. Copy/move this to another rails instance

  $ rake site:restore

h2. More info

The backup file can be specified with a command line argument in rake's (wierd) format:

  $ rake site:backup[/path/to/file.tgz]

h2. Compatibility

Tested initially on 'redmine' using rails 2.3.11 and some simpler tests with rails 3. Has been tested with MySQL and Sqlite3 databases. Further testing with postgres to be done.

Also tested with a dummy rails 3.0 app using sqlite3 driver in ruby 1.8.7, 1.9.2 and jruby 1.6.2.

This requires a system with access to the tar command in your path. (Easy for Mac & *nixes, may require a posix environment such as cygwin under Windows.)

h3. Known Issues:

  • under ruby 1.9.2, the YAML export (in the rake site:backup task fails extended characters in ASCII to UTF8 conversion) (Github Issue #4) Changes made in 0.0.9 that look like this is fixed - any help regressing is welcome!

h2. Contributors

Matt Connolly - main author of gem Tobias Lütke - wrote a "backup.rake":http://blog.leetsoft.com/2006/5/29/easy-migration-between-databases file that inspired the database backup portion.

h2. License

GPL(General Public License) - See LICENSE

FAQs

Package last updated on 07 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc