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
private
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
def folders_to_backup
folders = %w{repositories db}
if ENV["SKIP"]
return folders.reject{ |folder| ENV["SKIP"].include?(folder) }
end
def archives_to_backup
%w{uploads builds artifacts}.map{ |name| (name + ".tar.gz") unless skipped?(name) }.compact
end
folders
def folders_to_backup
%w{repositories db}.map{ |name| name unless skipped?(name) }.compact
end
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