diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-09-21 15:22:12 +0000 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-09-21 15:22:12 +0000 |
commit | 6c73ce6880c81cb0173815f0090c2db2ba36c135 (patch) | |
tree | e190bac962e89a7e765073b99c9e3cab301d38d2 /lib/support | |
parent | d26b4fa5388121b441545b3dc2b61651784c6802 (diff) | |
parent | 845947b925cdea25abedccecb862f2a1ee9b961c (diff) | |
download | gitlab-ci-6c73ce6880c81cb0173815f0090c2db2ba36c135.tar.gz |
Merge branch 'ci-final-migration' into 'master'
Final backup fixes
- Dump postgres with --no-owner and use conversion only
- Execute postgres converter only when using mysql
- Use gzip instead of zcat as more portable way to cat gziped file
@jacobvosmaer For you to merge.
See merge request !252
Diffstat (limited to 'lib/support')
-rwxr-xr-x | lib/support/mysql-postgresql-converter/splice_drop_indexes | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/support/mysql-postgresql-converter/splice_drop_indexes b/lib/support/mysql-postgresql-converter/splice_drop_indexes index 6621ab0..dc13f81 100755 --- a/lib/support/mysql-postgresql-converter/splice_drop_indexes +++ b/lib/support/mysql-postgresql-converter/splice_drop_indexes @@ -15,7 +15,7 @@ if [ -z "$db_gz" ] || [ -z "$drop_indexes_sql" ] ; then fi # Capture all text up to the first occurence of 'SET CONSTRAINTS' -preamble=$(zcat "$db_gz" | sed '/SET CONSTRAINTS/q') +preamble=$(gzip -cd "$db_gz" | sed '/SET CONSTRAINTS/q') if [ -z "$preamble" ] ; then fail "Could not read preamble" fi @@ -34,4 +34,4 @@ EOF # Print the rest of database.sql.gz. I don't understand this awk script but it # prints all lines after the first match of 'SET CONSTRAINTS'. -zcat "$db_gz" | awk 'f; /SET CONSTRAINTS/ { f = 1 }' +gzip -cd "$db_gz" | awk 'f; /SET CONSTRAINTS/ { f = 1 }' |