summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-09-18 14:28:08 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-09-18 14:28:08 +0200
commitda1fd14e60b75658b9c54d364bc436c683438c35 (patch)
tree05d780724f417bf71c1e8ccf37f597c5bbfb69a9
parent2781db6eed23238d4c6cdf538240fe863396b303 (diff)
downloadgitlab-ci-da1fd14e60b75658b9c54d364bc436c683438c35.tar.gz
Add some comments in the backup scripts
-rw-r--r--lib/backup/builds.rb6
-rw-r--r--lib/backup/database.rb1
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/backup/builds.rb b/lib/backup/builds.rb
index 52c6089..9746d24 100644
--- a/lib/backup/builds.rb
+++ b/lib/backup/builds.rb
@@ -13,6 +13,9 @@ module Backup
FileUtils.mkdir_p(File.dirname(backup_builds_tarball))
FileUtils.rm_f(backup_builds_tarball)
+ # Use 'tar -czf -' instead of 'tar -cz' because on some systems the
+ # default behavior of tar is to talk to a tape device instead of
+ # stdin/stdout.
system(
*%W(tar -C #{app_builds_dir} -czf - -- .),
out: [backup_builds_tarball, 'w', 0600]
@@ -23,6 +26,9 @@ module Backup
backup_existing_builds_dir
Dir.mkdir(app_builds_dir, 0700)
+ # Use 'tar -xzf -' instead of 'tar -xz' because on some systems the
+ # default behavior of tar is to talk to a tape device instead of
+ # stdin/stdout.
system(
*%W(tar -C #{app_builds_dir} -xzf - -- .),
in: backup_builds_tarball
diff --git a/lib/backup/database.rb b/lib/backup/database.rb
index 640b425..e63dcb8 100644
--- a/lib/backup/database.rb
+++ b/lib/backup/database.rb
@@ -2,6 +2,7 @@ require 'yaml'
module Backup
class Database
+ # These are the final CI tables (final prior to integration in GitLab)
TABLES = %w{
ci_application_settings ci_builds ci_commits ci_events ci_jobs ci_projects
ci_runner_projects ci_runners ci_services ci_tags ci_taggings ci_trigger_requests