summaryrefslogtreecommitdiff
path: root/lib/tasks/backup.rake
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-04 12:04:00 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-04 12:04:00 +0100
commit5b0c099cebaad0465380458d09aeeec904ae6691 (patch)
treeeb2f0cc4bf94792bcca5bec69746e60f194f25e7 /lib/tasks/backup.rake
parent46e3a768b175a80ae54e6b97b8cf6c4146718134 (diff)
rake db:force_now (does a backup without queuing).
Diffstat (limited to 'lib/tasks/backup.rake')
-rw-r--r--lib/tasks/backup.rake6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
index f08bb39..51fd2f2 100644
--- a/lib/tasks/backup.rake
+++ b/lib/tasks/backup.rake
@@ -10,6 +10,12 @@ namespace :backup do
echo "BackupJob ID: #{backup_job.id}"
end
+ desc "Do a backup. Now!"
+ task :force_now => :environment do
+ backup_job = BackupJob.create(:state => 'force now')
+ echo "BackupJob ID: #{backup_job.id}"
+ end
+
desc "Restore the system"
task :restore => :environment do
# This task takes the first RestoreJob to restore the system.