diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-10-06 15:21:15 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-10-06 15:21:15 +0200 |
commit | e789644783fae55f1095ffcc38b32f810f549caa (patch) | |
tree | 28d7ae20a76cf2a6228dd959d07023c5dac0d0d1 | |
parent | 7b71727c562b6f6337a180ae136be94bf0f6ed31 (diff) | |
download | gitlab-ce-e789644783fae55f1095ffcc38b32f810f549caa.tar.gz |
Keep old path: db/database.sql.gz
Documentation elsewhere refers to this internal path, let's keep
it.
-rw-r--r-- | lib/backup/database.rb | 3 | ||||
-rw-r--r-- | lib/backup/manager.rb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/backup/database.rb b/lib/backup/database.rb index 4bdf6e1c628..fe0434361e8 100644 --- a/lib/backup/database.rb +++ b/lib/backup/database.rb @@ -6,10 +6,11 @@ module Backup def initialize @config = YAML.load_file(File.join(Rails.root,'config','database.yml'))[Rails.env] - @db_file_name = File.join(Gitlab.config.backup.path, 'database.sql.gz') + @db_file_name = File.join(Gitlab.config.backup.path, 'db', 'database.sql.gz') end def dump + FileUtils.mkdir_p(File.dirname(db_file_name)) FileUtils.rm_f(db_file_name) compress_rd, compress_wr = IO.pipe compress_pid = spawn(*%W(gzip -1 -c), in: compress_rd, out: [db_file_name, 'w', 0600]) diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 53e79d4d1f7..f011fd03de0 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -150,11 +150,11 @@ module Backup private def backup_contents - folders_to_backup + ["database.sql.gz", "uploads.tar.gz", "builds.tar.gz", "backup_information.yml"] + folders_to_backup + ["uploads.tar.gz", "builds.tar.gz", "backup_information.yml"] end def folders_to_backup - folders = %w{repositories} + folders = %w{repositories db} if ENV["SKIP"] return folders.reject{ |folder| ENV["SKIP"].include?(folder) } |