This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
production: | |
sessions: | |
default: | |
uri: mongodb://<username>:<password>@<host>:<port>/<database_name> | |
options: | |
skip_version_check: true | |
consistency: :strong | |
safe: true | |
max_retries: 30 | |
retry_interval: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Twas the night before Christmas, when all through the house | |
Not a creature was stirring, not even a mouse. | |
The stockings were hung by the chimney with care, | |
In hopes that St Nicholas soon would be there. | |
The children were nestled all snug in their beds, | |
While visions of sugar-plums danced in their heads. | |
And mamma in her ‘kerchief, and I in my cap, | |
Had just settled our brains for a long winter’s nap. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mongo' | |
@conn = Mongo::Connection.new("localhost", 27017, :pool_size => 10, :pool_timeout => 5) | |
@db = @conn['mongomapper_resque_development'] | |
@coll = @db['users'] | |
puts @db.command({getLastError: 1}) | |
1.upto(10) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:set MONGOHQ_URL='mongodb://myusername:[email protected]:27017/my_database' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function split_db_dump { | |
if [ -f $1 ] | |
then | |
split -p 'Table structure' $1 | |
for file in x* | |
do | |
head -n1 $file | grep -oE '`[^`]+`' | sed 's/`//g' | xargs -n1 -I {} mv $file {} | |
done | |
else | |
echo "File name is required" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup/cli.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/cli.rb | |
77a78,81 | |
> | |
> opts.on("-h", "--host HOSTNAME", "Remote hostname to connect, defaults to local") do |host| | |
> options[:host] = host | |
> end | |
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup/engine.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/engine.rb | |
6c6 | |
< attr_reader :username, :password | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Possible cross-server database restoring of databases by adding the following at line 79 of: | |
# | |
# /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/cli.rb | |
# | |
# Then, you could run the following: | |
# | |
# eybackup -E my_other_environment -D my_local_db_name_if_different --restore 9:mybackedup_database.sql.gz | |
# | |
opts.on("-E", "--environment EY_Environment", "Engine Yard Environment.") do |environment| |
NewerOlder