From aaffa89ef9aef6ac30e3304d735a8c58f4bdaaef Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Mar 2013 11:54:19 +0100 Subject: rake backup:now starts a new backup. --- lib/tasks/backup.rake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 55369b6..8f56015 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -4,6 +4,12 @@ namespace :backup do # This would be the daily backup. end + desc "Do a backup. Now!" + task :now => :environment do + backup_job = BackupJob.create + 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. -- cgit v1.2.3 From 46e3a768b175a80ae54e6b97b8cf6c4146718134 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Mar 2013 11:56:03 +0100 Subject: rake db:queue_a_new_backup (better name) --- lib/tasks/backup.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 8f56015..f08bb39 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -4,8 +4,8 @@ namespace :backup do # This would be the daily backup. end - desc "Do a backup. Now!" - task :now => :environment do + desc "Do a backup." + task :queue_a_new_backup => :environment do backup_job = BackupJob.create echo "BackupJob ID: #{backup_job.id}" end -- cgit v1.2.3 From 5b0c099cebaad0465380458d09aeeec904ae6691 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Mar 2013 12:04:00 +0100 Subject: rake db:force_now (does a backup without queuing). --- lib/tasks/backup.rake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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. -- cgit v1.2.3 From a865b1f9506b900ed8643c01d94c86268e907720 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 5 Mar 2013 17:30:45 +0100 Subject: Added voicemails and recordings to the backup/restore. #195 --- lib/tasks/backup.rake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 51fd2f2..ad4d41d 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -41,6 +41,12 @@ namespace :backup do system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" end + # Restore recordings + # + if File.exists?("#{restore_directory}/GS5/archives/recordings.tar.gz") + system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/recordings.tar.gz" + end + # Restore avatars # if File.exists?("#{restore_directory}/GS5/archives/avatars.tar.gz") -- cgit v1.2.3