This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:gitlab [2020/04/14 01:59] – [Backup] tmade | linux:gitlab [2025/12/04 16:55] (current) – [Restore] tmade | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| / | / | ||
| / | / | ||
| + | |||
| + | ====Version==== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ====Upgrade Path==== | ||
| + | |||
| + | https:// | ||
| ====Commands==== | ====Commands==== | ||
| - | gitlab-rake gitlab: | + | gitlab-rake gitlab: |
| - | gitlab-rails console | + | gitlab-rake gitlab: |
| + | |||
| + | gitlab-rails console | ||
| + | gitlab-ctl show-config | ||
| + | gitlab-ctl reconfigure | ||
| + | gitlab-ctl --help | ||
| + | gitlab-rake db: | ||
| + | gitlab-ctl tail | ||
| + | gitlab-ctl status | ||
| + | gitlab-ctl restart | ||
| + | sudo docker exec -it gitlab grep ' | ||
| + | gitlab-rake " | ||
| + | gitlab-rake " | ||
| + | gitlab-rake " | ||
| + | ====logs==== | ||
| + | |||
| + | Running in docker: | ||
| + | | ||
| ====Backup==== | ====Backup==== | ||
| Line 19: | Line 46: | ||
| #version: 1.1 | #version: 1.1 | ||
| - | #set container-ID of your gitlab | + | #get container-ID of your gitlab |
| - | CONTAINERID=" | + | CONTAINERID=$(docker ps | grep gitlab | awk ' |
| docker exec -t ${CONTAINERID} gitlab-backup create | docker exec -t ${CONTAINERID} gitlab-backup create | ||
| Line 40: | Line 67: | ||
| # | # | ||
| - | #version: 1.1 | + | #version: 1.2 |
| - | #set container-ID of your gitlab | + | echo "" |
| - | CONTAINERID=" | + | echo " |
| + | echo "" | ||
| + | docker container ls -a |grep gitlab | ||
| + | echo "" | ||
| + | read -p " | ||
| + | echo " | ||
| + | echo "" | ||
| + | #CONTAINERID=" | ||
| docker exec -it ${CONTAINERID} gitlab-backup restore --trace | docker exec -it ${CONTAINERID} gitlab-backup restore --trace | ||
| Line 55: | Line 89: | ||
| echo "ID \" | echo "ID \" | ||
| + | </ | ||
| + | |||
| + | ====Repo==== | ||
| + | |||
| + | To add a repo on cmd: | ||
| + | |||
| + | < | ||
| + | #!/bin/sh | ||
| + | #run " | ||
| + | #token has previously to be created within gitlab-user-profile and than referenced on " | ||
| + | user_token=" | ||
| + | curl -H " | ||
| + | </ | ||
| + | |||
| + | =====Compose===== | ||
| + | |||
| + | < | ||
| + | # GitLab CE deployment using two external volumes; one for data and another | ||
| + | # for configuration. These volumes needs to be created prior to starting GitLab | ||
| + | # using the following commands: | ||
| + | # docker volume create gitlab-data | ||
| + | # docker volume create gitlab-config | ||
| + | # | ||
| + | # In addition you may want to change the hostname value in the Docker-Compose | ||
| + | # configuration below to match the name of your server/ | ||
| + | # GitLab is to be run. | ||
| + | # | ||
| + | # Once started, access GitLab using the URL http:// | ||
| + | # | ||
| + | # The following ports are exposed by GitLab: | ||
| + | # 8880 (HTTP) | ||
| + | # 443 (if you configure HTTPS) | ||
| + | # 8080 (used by Unicorn) | ||
| + | # 8822 (used by the SSH daemon) | ||
| + | # | ||
| + | # The GitLab documentation suggests the following line to be added to the | ||
| + | # GITLAB_OMNIBUS_CONFIG environment variable. | ||
| + | # external_url ' | ||
| + | # However, with this line present I am unable to access the GitLab webpage. | ||
| + | #version: ' | ||
| + | # | ||
| + | #services: | ||
| + | # gitlab: | ||
| + | # image: gitlab/ | ||
| + | # hostname: hostname | ||
| + | # environment: | ||
| + | # GITLAB_OMNIBUS_CONFIG: | ||
| + | # gitlab_rails[' | ||
| + | # ports: | ||
| + | # - " | ||
| + | # - " | ||
| + | # - " | ||
| + | # The logs directory can be mapped to the logs directory in the same director | ||
| + | # as the docker-compose file using the following entry under volumes: | ||
| + | web: | ||
| + | image: ' | ||
| + | #image: ' | ||
| + | restart: always | ||
| + | hostname: ' | ||
| + | #hostname: ' | ||
| + | environment: | ||
| + | GITLAB_OMNIBUS_CONFIG: | ||
| + | external_url ' | ||
| + | # Add any other gitlab.rb configuration here, each on its own line | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | gitlab_rails[' | ||
| + | ports: | ||
| + | - ' | ||
| + | - ' | ||
| + | - ' | ||
| + | - ' | ||
| + | volumes: | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| </ | </ | ||