small medium large xlarge

Generic-user-small
18 Aug 2012, 20:44
OTA (3 posts)

use this instead:

namespace :db do

desc “Backup the development database” task :backup => :environment do backup_dir = ENV[‘DIR’] || File.join(Rails.root, ‘db’, ‘backup’)

source = Regexp.escape(File.join(Rails.root, 'db', "development.db"))
dest   = Regexp.escape(File.join(backup_dir, "development.backup"))

makedirs backup_dir, :verbose => true
sh "sqlite3 #{source} .dump > #{dest}"   end

end

You must be logged in to comment