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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0b62fb45
Commit
0b62fb45
authored
Jun 06, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Geo Disaster Recovery documentation.
parent
70261f62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
doc/gitlab-geo/README.md
doc/gitlab-geo/README.md
+4
-0
doc/gitlab-geo/disaster-recovery.md
doc/gitlab-geo/disaster-recovery.md
+35
-0
No files found.
doc/gitlab-geo/README.md
View file @
0b62fb45
...
...
@@ -12,6 +12,7 @@ locations as a read-only fully operational version.
-
[
Database Replication
](
./database.md
)
-
[
Configuration
](
./configuration.md
)
-
[
Current limitations
](
#current-limitations
)
-
[
Disaster Recovery
](
./disaster-recovery.md
)
-
[
Frequently Asked Questions
](
#frequently-asked-questions
)
-
[
Can I use Geo in a disaster recovery situation?
](
#can-i-use-geo-in-a-disaster-recovery-situation
)
-
[
What data is replicated to a secondary node?
](
#what-data-is-replicated-to-a-secondary-node
)
...
...
@@ -77,6 +78,9 @@ There are limitations to what we replicate (see Current limitations).
In an extreme data-loss situation you can make a secondary Geo into your
primary, but this is not officially supported yet.
If you still want to proceed, see our step-by-step instructions on how to
manually
[
promote a secondary node
](
./disaster-recovery.md
)
into primary.
### What data is replicated to a secondary node?
We currently replicate project repositories and the whole database. This
...
...
doc/gitlab-geo/disaster-recovery.md
0 → 100644
View file @
0b62fb45
# GitLab Geo Disaster Recovery
> **Note:**
This is not officially supported yet, please don't use as your only
Disaster Recovery strategy as you may loose data.
GitLab Geo replicates your database and your Git repositories. We will
support and replicate more data in the future, that will enable you to
fail-over with minimal effort, in a disaster situation.
See
[
current limitations
](
./README.md#current-limitations
)
for more information.
## Promoting a secondary node
We don't provide yet an automated way to promote a node and do fail-over,
but you can do it manually if you have
`root`
access to the machine.
You must make the changes in the exact specific order:
1.
Take down your primary node (or make sure it will not go up during this
process or you may loose data)
2.
Wait for any database replication to finish
3.
Promote the Postgres in your secondary node as primary
4.
Log-in to your secondary node with a user with
`sudo`
permission
5.
Open the interactive rails console:
`sudo gitlab-rails console`
and execute:
1.
`Gitlab::Geo.primary_node.update(primary: false)`
2.
List your secondary nodes and note down the id of the one you want to
promote:
`Gitlab::Geo.secondary_nodes`
3.
To promote a node with id
`2`
execute:
`GeoNode.find(2).update(primary: true)`
4.
To exit the interactive console, type:
`exit`
6.
Rsync everything in
`/var/opt/gitlab/gitlab-rails/uploads`
and
`/var/opt/gitlab/gitlab-rails/shared`
from your old node to the new one.
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