In your command-line run the following commands:
brew doctorbrew update
In your command-line run the following commands:
brew doctorbrew update| namespace :db do | |
| DUMP_FMT = 'p' # 'c', 'p', 't', 'd' | |
| desc 'Dumps the database to backups' | |
| task sql_dump: :environment do | |
| dump_sfx = suffix_for_format(DUMP_FMT) | |
| backup_dir = backup_directory(true) | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| file_name = Time.now.strftime("%Y%m%d%H%M%S") + "_" + db + '.' + dump_sfx |
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |