This is a maintained listing of all the different ways to debug and profile Node.js applications. If there is something missing or an improvement, post a comment! :)
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
| namespace :db do desc "Backup project database. Options: DIR=backups RAILS_ENV=production MAX=7" | |
| task :backup => [:environment] do | |
| datestamp = Time.now.strftime("%Y-%m-%d_%H-%M-%S") | |
| base_path = Rails.root | |
| base_path = File.join(base_path, ENV["DIR"] || "backups") | |
| backup_base = File.join(base_path, 'db_backups') | |
| backup_folder = File.join(backup_base, datestamp) | |
| backup_file = File.join(backup_folder, "#{RAILS_ENV}_dump.sql") | |
| FileUtils.mkdir_p(backup_folder) | |
| db_config = ActiveRecord::Base.configurations[RAILS_ENV] |
NewerOlder