summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/restore_jobs_controller.rb1
-rw-r--r--config/backup.rb1
-rw-r--r--lib/tasks/backup.rake2
3 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/restore_jobs_controller.rb b/app/controllers/restore_jobs_controller.rb
index 1cccdc1..bfecc33 100644
--- a/app/controllers/restore_jobs_controller.rb
+++ b/app/controllers/restore_jobs_controller.rb
@@ -16,6 +16,7 @@ class RestoreJobsController < ApplicationController
@restore_job.state = 'new'
if @restore_job.save
+ session[:user_id] = nil
redirect_to @restore_job, :notice => t('restore_jobs.controller.successfuly_created')
else
render :new
diff --git a/config/backup.rb b/config/backup.rb
index aa8ade3..1c79c04 100644
--- a/config/backup.rb
+++ b/config/backup.rb
@@ -24,6 +24,7 @@ Backup::Model.new(:GS5, 'GS5 backup') do
db.host = "localhost"
db.port = 3306
db.socket = "/var/run/mysqld/mysqld.sock"
+ db.skip_tables = ["backup_jobs", "restore_jobs"]
end
##
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
index fec3956..d12bf5e 100644
--- a/lib/tasks/backup.rake
+++ b/lib/tasks/backup.rake
@@ -35,6 +35,8 @@ namespace :backup do
system "gunzip < /tmp/gs5_restore_directory/*/GS5/databases/MySQL/gemeinschaft.sql.gz | mysql -u #{db_user} -p#{db_password} #{database}"
FileUtils.rm_rf tmp_dir
+
+ system "cd /opt/gemeinschaft && rake db:migrate"
end
end