summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-11-18 11:39:26 +0100
committerMarin Jankovski <maxlazio@gmail.com>2015-11-19 10:43:45 +0100
commit3cc2b48a82aae8b535ddf11e9057a29f2242524c (patch)
treed4bf1c24b98d3467306cea0c16d15ab92d4173ad /lib/backup
parent060e59f05436f29640f6890c69426be1cd79e5cd (diff)
downloadgitlab-ce-3cc2b48a82aae8b535ddf11e9057a29f2242524c.tar.gz
Backup LFS objects same as any upload.
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/lfs.rb13
-rw-r--r--lib/backup/manager.rb2
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/backup/lfs.rb b/lib/backup/lfs.rb
new file mode 100644
index 00000000000..4153467fbee
--- /dev/null
+++ b/lib/backup/lfs.rb
@@ -0,0 +1,13 @@
+require 'backup/files'
+
+module Backup
+ class Lfs < Files
+ def initialize
+ super('lfs', Settings.lfs.storage_path)
+ end
+
+ def create_files_dir
+ Dir.mkdir(app_files_dir, 0700)
+ end
+ end
+end
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index e7eda7c6f45..099062eeb8b 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -154,7 +154,7 @@ module Backup
end
def archives_to_backup
- %w{uploads builds artifacts}.map{ |name| (name + ".tar.gz") unless skipped?(name) }.compact
+ %w{uploads builds artifacts lfs}.map{ |name| (name + ".tar.gz") unless skipped?(name) }.compact
end
def folders_to_backup