“Rake, canada goose down jackets women store online
. pull me that DB. ”
After writing my last article how to Convert PostgreSQL to SQLite. I was asked why this couldn’t be automated.
So I started coding and managed to create a Rake task that will do all of the steps I described in the article in just a few seconds.
Today a found a project that does exactly the samething as the below rake task. but with support for more db providers authentic mens canada goose expedition jacket online store . Heroku uses this project for retrieving and pushing you database to the heroku database server mens canada goose expedition jacket online store , discount canada goose chilliwack 2015 .
The project is called Taps and can be found here. http. //adam mens canada goose expedition jacket online store sales . heroku. com/past/2009/2/11/taps_for_easy_database_transfers
To use the Rake task. you have to add 2 additional fields (ssh_user and ssh_host) to your database mens canada goose expedition jacket online store . yml file discount mens canada goose expedition jacket online store . These fields are used to create an ssh connection for retrieving the PostgreSQL dump.
Here’s example of a modified config/database. yml
Put the following code into libs/tasks/database. rake
If you want to skip the step where the rake tasks get’s the dump using ssh. you have to copy the dump mens canada goose expedition jacket online store . sql into the tmp folder by yourself (note that the name must be dump mens canada goose expedition jacket online store sales . sql
After you copied it. you should execute the following commands, toronto store canada goose cheap . to generate the development database with the dumped sql.
You could generate a public/private key pair with RSA and append that key to the production server so you don’t have to enter the password over and over again to connect with ssh.
1. Generate a public/private key pair with RSA
First check if you haven’t already generated a id_rsa file in your $HOME/ canada goose citadel spirit sales . shh folder. If you already have a id_rsa file continue with step 2 canada goose florida shop online store .
Run the following command on you local machine and accept the defaults cheap buy canada goose parka london .
2 canada goose parka blog 2015 . Install public key on remote machine
Now you can copy the public key to the remote machine by executing the following command mens canada goose expedition jacket online store .
This command will ask you to enter the ssh password for the ssh user “root” for the hostname “productionserver. com”.
After you’ve enter the password (for the last time) you can create a ssh connection without entering the password by executing.