Socket
Book a DemoInstallSign in
Socket

mysql_mirror

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql_mirror

0.1.3
bundlerRubygems
Version published
Maintainers
2
Created
Source

= Mysql Mirror Use MysqlMirror to mirror data between databases. This can be useful when you want to update your development or staging environments with real data to work with. Or, if you do some heavy lifting calculations on another server, you might want to use a seperate database on another host, etc.

=== General Approach

  • Mirror Across Hosts: performs a mysql_dump to an sql file, then imports file to target host
  • Mirror Same Host: uses CREATE TABLE ( SELECT ... ) style for mirroring. Much faster than mysql_dump

Note: ALL information will be lost in the tables mirrored to the Target Database

== Dependencies

  • Active Record
  • FileUtils

== Usage Basic usage, copy production db to development @m = MysqlMirror.new({ :source => :production, :target => :development })

Choose what tables you want to bring over and how you want to scope them... @m = MysqlMirror.new({ :source => :production, :target => :development, :tables => [:users, :widgets], :where => {:users => "is_admin NOT NULL"}, })

Database information not in your database.yml file? (Or Not Running Rails?) No Problem! @m = MysqlMirror.new({ :source => { :database => "app_production", :user => ..., :password => ..., :hostname => ...}, :target => {:database => "app_development", :hostname => 'localhost'} })

Want to use everything in :production environment (user, pass, host) but need to change the database? @m = MysqlMirror.new({ :source => :production, :override => {:source => {:database => "heavy_calculations_database"}}, :target => :production })

FAQs

Package last updated on 31 Mar 2010

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.