summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/backup.rake
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-31 18:22:44 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-31 18:22:44 +0200
commite5ff5c28694daee117f22ba3a8c21f38a5f14966 (patch)
tree9e5f3691a156eb6dc499e12351af55080556caf3 /lib/tasks/gitlab/backup.rake
parent30d6370719263da531d2405fb561d34e1340f49e (diff)
downloadgitlab-ce-e5ff5c28694daee117f22ba3a8c21f38a5f14966.tar.gz
Use project with namespace in email subject
Diffstat (limited to 'lib/tasks/gitlab/backup.rake')
-rw-r--r--lib/tasks/gitlab/backup.rake8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake
index 82c8dd8ca11..677ecf21bdc 100644
--- a/lib/tasks/gitlab/backup.rake
+++ b/lib/tasks/gitlab/backup.rake
@@ -118,10 +118,10 @@ namespace :gitlab do
task :create => :environment do
backup_path_repo = File.join(Gitlab.config.backup.path, "repositories")
FileUtils.mkdir_p(backup_path_repo) until Dir.exists?(backup_path_repo)
- puts "Dumping repositories ..."
+ puts "Dumping repositories ...".blue
Project.find_each(:batch_size => 1000) do |project|
- print "#{project.path_with_namespace} ... "
+ print " * #{project.path_with_namespace} ... "
if project.empty_repo?
puts "[SKIPPED]".cyan
@@ -174,9 +174,9 @@ namespace :gitlab do
backup_path_db = File.join(Gitlab.config.backup.path, "db")
FileUtils.mkdir_p(backup_path_db) unless Dir.exists?(backup_path_db)
- puts "Dumping database tables ... "
+ puts "Dumping database tables ... ".blue
ActiveRecord::Base.connection.tables.each do |tbl|
- print "#{tbl.yellow} ... "
+ print " * #{tbl.yellow} ... "
count = 1
File.open(File.join(backup_path_db, tbl + ".yml"), "w+") do |file|
ActiveRecord::Base.connection.select_all("SELECT * FROM `#{tbl}`").each do |line|