Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8cc788be
Commit
8cc788be
authored
Sep 17, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indent database dump steps one more level
[ci skip]
parent
567eac03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
39 deletions
+39
-39
doc/migrate_ci_to_ce/README.md
doc/migrate_ci_to_ce/README.md
+39
-39
No files found.
doc/migrate_ci_to_ce/README.md
View file @
8cc788be
...
...
@@ -118,45 +118,45 @@ each installation.
values `IN_UPPERCASE` with the corresponding values from your **CI
installation's** `config/database.yml` files above.
- If both your CI and CE (or EE) installations use **mysql2** as the `adapter`, use
`mysqldump`:
```sh
mysqldump --default-character-set=utf8 --complete-insert --no-create-info \
--host=DB_USERNAME --port=DB_PORT --user=DB_HOSTNAME -p GITLAB_CI_DATABASE \
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 \
ci_triggers ci_variables ci_web_hooks > gitlab_ci.sql
```
- If both your CI and CE (or EE) installations use **postgresql** as the
`adapter`, use `pg_dump`:
```sh
pg_dump -h DB_HOSTNAME -U DB_USERNAME -p DB_PORT \
--data-only GITLAB_CI_DATABASE -t "ci_*" > gitlab_ci.sql
```
- If your CI installation uses **mysql2** as the `adapter` and your CE (or
EE) installation uses **postgresql**, use `mysqldump` to dump the database
and then convert it to PostgreSQL using [mysql-postgresql-converter]:
```sh
# Dump existing MySQL database first
mysqldump --default-character-set=utf8 --compatible=postgresql --complete-insert \
--host=DB_USERNAME --port=DB_PORT --user=DB_HOSTNAME -p GITLAB_CI_DATABASE \
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 \
ci_triggers ci_variables ci_web_hooks > gitlab_ci.sql.tmp
# Convert database to be compatible with PostgreSQL
git clone https://github.com/gitlabhq/mysql-postgresql-converter.git -b gitlab
python mysql-postgresql-converter/db_converter.py gitlab_ci.sql.tmp gitlab_ci.sql.tmp2
ed -s gitlab_ci.sql.tmp2 < mysql-postgresql-converter/move_drop_indexes.ed
# Filter to only include INSERT statements
grep "^\(START\|SET\|INSERT\|COMMIT\)" gitlab_ci.sql.tmp2 > gitlab_ci.sql
```
- If both your CI and CE (or EE) installations use **mysql2** as the `adapter`, use
`mysqldump`:
```sh
mysqldump --default-character-set=utf8 --complete-insert --no-create-info \
--host=DB_USERNAME --port=DB_PORT --user=DB_HOSTNAME -p GITLAB_CI_DATABASE \
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 \
ci_triggers ci_variables ci_web_hooks > gitlab_ci.sql
```
- If both your CI and CE (or EE) installations use **postgresql** as the
`adapter`, use `pg_dump`:
```sh
pg_dump -h DB_HOSTNAME -U DB_USERNAME -p DB_PORT \
--data-only GITLAB_CI_DATABASE -t "ci_*" > gitlab_ci.sql
```
- If your CI installation uses **mysql2** as the `adapter` and your CE (or
EE) installation uses **postgresql**, use `mysqldump` to dump the database
and then convert it to PostgreSQL using [mysql-postgresql-converter]:
```sh
# Dump existing MySQL database first
mysqldump --default-character-set=utf8 --compatible=postgresql --complete-insert \
--host=DB_USERNAME --port=DB_PORT --user=DB_HOSTNAME -p GITLAB_CI_DATABASE \
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 \
ci_triggers ci_variables ci_web_hooks > gitlab_ci.sql.tmp
# Convert database to be compatible with PostgreSQL
git clone https://github.com/gitlabhq/mysql-postgresql-converter.git -b gitlab
python mysql-postgresql-converter/db_converter.py gitlab_ci.sql.tmp gitlab_ci.sql.tmp2
ed -s gitlab_ci.sql.tmp2 < mysql-postgresql-converter/move_drop_indexes.ed
# Filter to only include INSERT statements
grep "^\(START\|SET\|INSERT\|COMMIT\)" gitlab_ci.sql.tmp2 > gitlab_ci.sql
```
[
mysql-postgresql-converter
]:
https://github.com/gitlabhq/mysql-postgresql-converter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment