Backup-Restore - Kylie Norquist
module-name: "Backup-Restore"
area: "Product Knowledge"
gitlab-group: "Enablement:Geo"
maintainer:
- Manu, @manuelgrabowski
Goal of this checklist: Set a clear path for Backup-Restore training
Stage 0: Create and commit to the module
-
Create an issue using this template by making the Issue Title: Backup-Restore - "your name" -
Add yourself and your trainer as the assignees. -
Notify your manager to let them know you've started. -
Optional: Set a milestone, if applicable, and a due date to help motivate yourself! -
Update support-team.yaml
to indicate that you've started learning this knowledge area:knowledge_areas: - name: Backup-Restore level: 1
Stage 1: Become familiar with the basic Backup-Restore process
-
Done with Stage 1
-
Read about the basics of taking a backup -
- Feel free to read up on all of the other documentation, we are focusing on the Omnibus backup at this step
-
Read about the basics of restoring a backup -
- Again, feel free to read up on additional documentation, but the Omnibus restore will be the basic focus for this module
-
Stage 2: Hands On
-
Done with Stage 2
-
Backup
-
Setup a personal GitLab instance (this can be one you use personally now or a test instance you spin up) Omnibus preferred -
Recommended to have some data pushed to your instance but not required optional -
Successfully create a full backup with the command sudo gitlab-backup create
-
Safely copy and save configuration files (preferably off-site of your gitlab instance): -
/etc/gitlab/gitlab-secrets.json -
/etc/gitlab/gitlab.rb
-
-
Verify that the backup is in the correct location - default location → /var/opt/gitlab/backups
(Unless configured in your gitlab.rb file to another location)
-
-
Bonus points - Not Required Setup a backup using a crontab -
Restore
Side note - Its more fulfilling if you wipe your current instance before restoring. This gives you a clear way to verify things were restored in the correct location and that your configuration files are also correctly restored.
This procedure assumes that:
- You have installed the exact same version and type (CE/EE) of GitLab Omnibus with which the backup was created
- You have run `sudo gitlab-ctl reconfigure` at least once
- GitLab is running. If not, start it using `sudo gitlab-ctl start`
-
First ensure your backup tar file is in the backup directory described in the gitlab.rb
→ configurationgitlab_rails['backup_path']
and owned by the git user. -
Copy the timestamp from your backup file. Example → 11493107454_2018_04_25_10.6.4-ce_gitlab_backup.tar
copy11493107454_2018_04_25_10.6.4-ce
-
Proceed to run the restore command → sudo gitlab-backup restore BACKUP=11493107454_2018_04_25_10.6.4-ce
(using the timestamp you copied earlier) -
Replace the configuration files with the ones you have saved in the backup process -
/etc/gitlab/gitlab-secrets.json -
/etc/gitlab/gitlab.rb
-
-
reconfigure/restart and verify your restore has completed -
sudo gitlab-ctl reconfigure
-
sudo gitlab-ctl restart
-
sudo gitlab-rake gitlab:check
-
- Congratulations! You have successfully taken a backup of your instance and ran a restore!
- If you have any questions, or run into any issues, please first check our troubleshooting docs to see if you are able to correct any errors on your own. If you are still stuck, reach out to someone on the team who's already experienced in Backup-Restore.
Stage 3: Tickets
This stage can be skipped with manager approval
-
Done with Stage 3
-
Find 2-3 Solved tickets to get a sense of how others have handled basic backup/restore issues -
__ -
__ -
__
-
-
Answer 2-3 tickets on this module's topic and paste the links here. Do this even if a ticket seems too advanced for you to answer. Find the answers from an expert and relay them to the customers. -
__ -
__ -
__
-
Stage 4: Additional information/reading
-
Done with Stage 4
-
Review our troubleshooting docs -
If possible comment any errors, or trouble, that you ran into while going through the backup/restore process
Penultimate stage: Review
Any updates or improvements needed? If there are any dead links, out of date or inaccurate content, missing content whether in this module or in other documentation, list it below as tasks for yourself! Once ready, have a maintainer or manager review.
Final Stage
-
Have your trainer review your tickets. If you do not have a trainer, ask an expert to review. -
Manager: schedule a call (or integrate into 1:1) to review how the module went. -
Submit a MR to update modules
andknowledge_areas
in the Support Team yaml file with this training module's topic. You will now be listed as an expert in Backup-Restore on Skills by Person page.