Sha256: 50385f85b86d50ac465182253f53d55ed2e303bedfb2a877df63f2273a3f035d
Contents?: true
Size: 526 Bytes
Versions: 3
Compression:
Stored size: 526 Bytes
Contents
require 'bcms_content_syncing/database' namespace :db do desc "Backup database to a yaml file in db/backup" task :backup => :environment do # Skip the users table (to avoid changing logins) Cms::Database.backup ['users'] end desc "Drops and recreates the database from most recent backup in db/backup. Can specify FILE=filename also." task :restore => :environment do filename = ENV['FILE'].blank? ? Dir['db/backup/backup-latest.yml'].last : ENV['FILE'] Cms::Database.restore(filename) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bcms_content_syncing-1.0.2 | lib/tasks/backup.rake |
bcms_content_syncing-1.0.1 | lib/tasks/backup.rake |
bcms_content_syncing-1.0.0 | lib/tasks/backup.rake |