git Backup and Recovery

Source: Internet
Author: User

To add a key (in order to back up an SSH project) to the Ditlab container cd/home/git/gitlabbundle exec rake gitlab:backup:create rails_env= in the personal user settings before actually applying the settings Production Cd/home/git/gitlabbundle exec bin/rake gitlab:backup:restore rails_env=production chown git:git-r/opt/ Gitlab-7.11.4-0/apps/gitlab/repositories above for self-time content, the following is reproduced other people content Gitlab installation and backup recovery 2015-08-07 15:22:03

Category: Project management


Download the installation package wget Https://downloads.bitnami.com/files/stacks/gitlab/7.11.4-0/bitnami-gitlab-7.11.4-0-linux-x64-installer.run
Then change to execute permission: chmod a+x Bitnami-gitlab-7.11.4-0-linux-x64-installer.run
To perform the installation again:./bitnami-gitlab-7.11.4-0-linux-x64-installer.run
Follow the prompts to install the input y/n installation:

Click (here) to collapse or open

  1. [Email protected] ~]#./bitnami-gitlab-7.11.4-0-linux-x64-installer.run
  2. The installer detects that exists a ' git ' user in the system. This installer would change the configuration for this user. Want to continue the installation? [y/n]: Y
  3. The installer detects that exists a ' gitlab_ci ' user in the system. This installer would change the configuration for this user. Want to continue the installation? [y/n]: Y
  4. ----------------------------------------------------------------------------
  5. Welcome to the Bitnami Gitlab Stack Setup Wizard.
  6. ----------------------------------------------------------------------------
  7. Select the components of your want to install; Clear the components does not want
  8. To install. Click Next When your is ready to continue.
  9. Phppgadmin [y/n]: Y
  10. Gitlab:y (cannot be edited)
  11. GitLab CI [y/n]: Y
  12. Is the selection above correct? [y/n]: Y
  13. ----------------------------------------------------------------------------
  14. installation folder
  15. Please, choose a folder to install Bitnami Gitlab Stack
  16. Select a folder [/opt/gitlab-7.11.4-0]:/opt/bitnami
  17. ----------------------------------------------------------------------------
  18. Create Admin Account
  19. Bitnami Gitlab Stack Admin user creation
  20. email Address [[email protected]: [email protected]
  21. Login [user]: Test
  22. Password:
  23. Please confirm your password:
  24. ----------------------------------------------------------------------------
  25. Hostname that'll be used to create internal URLs. If This value is incorrect,
  26. You are unable to access your Gitlab installation from other computers. It is
  27. advisable to use a Domain instead of the IP address for compatibility with
  28. Different browsers.
  29. Domain [127.0.0.1]: test.gitlab.com
  30. Do you want to configure mail support? [y/n]: N
  31. ----------------------------------------------------------------------------
  32. Setup is now the ready to begin installing Bitnami Gitlab Stack on your computer.
  33. Want to continue? [y/n]: Y
  34. ----------------------------------------------------------------------------
  35. Please wait while the Setup installs Bitnami Gitlab Stack on your computer.
  36. Installing
  37. 0% ______________ 50% ______________ 100%
  38. #########################################
  39. ----------------------------------------------------------------------------
  40. Setup has finished installing Bitnami Gitlab Stack on your computer.
  41. Info:to access the Bitnami Gitlab Stack, go to
  42. Http://dev.domain.org:80 from your browser.
  43. Press [Enter] to continue:
The red logo above is set according to your preferences, such as installation path, Admin user and so on.
To this end, the entire installation, set the host after access to test.gitlab.com can be used normally.



Backup and restore operations, the following operations are performed using the root user:
1. Specify the backup path vi/opt/gitlab-6.4.3-1/apps/gitlab/htdocs/config/gitlab.yml, and find the changes shown below

Click (here) to collapse or open

    1. # # Backup Settings
    2. Backup
    3. Path: "/tmp/backups" # Relative paths is Relative to Rails.root (default:tmp/backups/)

2. Perform backup

Click (here) to collapse or open

    1. cd/opt/gitlab-7.11.4-0/
    2. ./use_gitlab
    3. Cd/opt/gitlab-7.11.4-0/apps/gitlab/htdocs
    4. Bundle EXEC Bin/rake gitlab:backup:create rails_env=production
When the operation is complete, a backup file is produced in the/tmp/backups/directory, similar to the 1438917368_gitlab_backup.tar

3. Restore the backed up data

Click (here) to collapse or open

    1. cd/opt/gitlab-7.11.4-0/
    2. ./use_gitlab
    3. Cd/opt/gitlab-7.11.4-0/apps/gitlab/htdocs
    4. Bundle EXEC Bin/rake Gitlab:backup:restore rails_env=production
    5. Chown Git:git-r/opt/gitlab-7.11.4-0/apps/gitlab/repositories
If you have more than one backup file in the directory you are backing up, you need to specify the backup file backup=xxx after rails_env=production.
The backup has been restored to completion.

git Backup and Recovery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.