Commit f5e3d93c authored by Marin Jankovski's avatar Marin Jankovski

Check which folders and archives should be packed before passing to tar command.

parent 3b1f68e4
...@@ -150,17 +150,15 @@ module Backup ...@@ -150,17 +150,15 @@ module Backup
private private
def backup_contents def backup_contents
folders_to_backup + ["uploads.tar.gz", "builds.tar.gz", "artifacts.tar.gz", "backup_information.yml"] folders_to_backup + archives_to_backup + ["backup_information.yml"]
end end
def folders_to_backup def archives_to_backup
folders = %w{repositories db} %w{uploads builds artifacts}.map{ |name| (name + ".tar.gz") unless skipped?(name) }.compact
if ENV["SKIP"]
return folders.reject{ |folder| ENV["SKIP"].include?(folder) }
end end
folders def folders_to_backup
%w{repositories db}.map{ |name| name unless skipped?(name) }.compact
end end
def settings def settings
......
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