Commit e7896447 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Keep old path: db/database.sql.gz

Documentation elsewhere refers to this internal path, let's keep
it.
parent 7b71727c
......@@ -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])
......
......@@ -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) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment