Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:gitlab_archlinux_-_restore

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:gitlab_archlinux_-_restore [2024/03/23 17:26] – [GitLab: Restore-Befehl] klaustachtler:gitlab_archlinux_-_restore [2024/03/23 18:24] (aktuell) – [GitLab: Dienste/Daemons starten] klaus
Zeile 90: Zeile 90:
  
 :!: **ACHTUNG** - **Hier ist die vom Backup-Befehl erstellte Datei zu berücksichtigen!** :!: **ACHTUNG** - **Hier ist die vom Backup-Befehl erstellte Datei zu berücksichtigen!**
 +
 +Damit alle Daten wiederhergestellt werden, ist es jedoch erforderlich, das der Dienst/Daemon
 +  * **''gitlab-gitaly.service''**
 +läuft, was mit nachfolgendem Befehl realisiert werden kann:
 +<code>
 +# systemctl start gitlab-gitaly.service
 +</code>
 +
 +:!: **ACHTUNG** - **Der Dienst/Daemon ''gitlab-gitaly.service'' __muss zwingend gestartet sein__ !!!**
  
 Mit nachfolgendem Befehl **__muss__ zwingend** in das Verzeichnis ''/usr/share/webapps/gitlab'' gewechselt werden: Mit nachfolgendem Befehl **__muss__ zwingend** in das Verzeichnis ''/usr/share/webapps/gitlab'' gewechselt werden:
Zeile 100: Zeile 109:
 # sudo -u gitlab $(cat environment | xargs) bundle exec rake gitlab:backup:restore RAILS_ENV=production BACKUP=1711175567_2024_03_23_16.9.2 # sudo -u gitlab $(cat environment | xargs) bundle exec rake gitlab:backup:restore RAILS_ENV=production BACKUP=1711175567_2024_03_23_16.9.2
 </code> </code>
 +
 +:!: **ACHTUNG** - 
 +  * **__keine__ Angabe des Pfades zur Sicherungsdatei** 
 +  * **__keine__ Angabe von ''_gitlab_backup.tar'' !!!**
  
 <code> <code>
 # sudo -u gitlab $(cat environment | xargs) bundle exec rake gitlab:backup:restore RAILS_ENV=production BACKUP=1711175567_2024_03_23_16.9.2 # sudo -u gitlab $(cat environment | xargs) bundle exec rake gitlab:backup:restore RAILS_ENV=production BACKUP=1711175567_2024_03_23_16.9.2
-2024-03-23 16:18:43 +0100 -- Unpacking backup ...  +2024-03-23 16:27:29 +0100 -- Unpacking backup ...  
-2024-03-23 16:18:43 +0100 -- Unpacking backup ... done +2024-03-23 16:27:29 +0100 -- Unpacking backup ... done 
-2024-03-23 16:18:43 +0100 -- Restoring database ...  +2024-03-23 16:27:29 +0100 -- Restoring database ...  
-2024-03-23 16:18:43 +0100 -- Be sure to stop Puma, Sidekiq, and any other process that+2024-03-23 16:27:29 +0100 -- Be sure to stop Puma, Sidekiq, and any other process that
 connects to the database before proceeding. For Omnibus connects to the database before proceeding. For Omnibus
 installs, see the following link for more information: installs, see the following link for more information:
Zeile 118: Zeile 131:
 Do you want to continue (yes/no)? yes Do you want to continue (yes/no)? yes
 Removing all tables. Press `Ctrl-C` within 5 seconds to abort Removing all tables. Press `Ctrl-C` within 5 seconds to abort
-2024-03-23 16:19:10 +0100 -- Cleaning the database ...  +2024-03-23 16:27:39 +0100 -- Cleaning the database ...  
-2024-03-23 16:19:13 +0100 -- done+2024-03-23 16:27:41 +0100 -- done
 Restoring PostgreSQL database gitlabhq_production ... SET Restoring PostgreSQL database gitlabhq_production ... SET
 SET SET
Zeile 196: Zeile 209:
 [DONE] [DONE]
 Source backup for the database ci doesn't exist. Skipping the task Source backup for the database ci doesn't exist. Skipping the task
-2024-03-23 16:19:27 +0100 -- Restoring database ... done +2024-03-23 16:27:55 +0100 -- Restoring database ... done 
-2024-03-23 16:19:27 +0100 -- Restoring repositories ...  +2024-03-23 16:27:55 +0100 -- Restoring repositories ...  
-{"level":"warning","msg":"[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {Addr: \"/run/gitlab/gitlab-gitaly.socket\", ServerName: \"localhost\", Attributes: {\"\u003c%!p(networktype.keyType=grpc.internal.transport.networktype)\u003e\": \"unix\" }, }. Err: connection error: desc = \"transport: Error while dialing: dial unix ///run/gitlab/gitlab-gitaly.socket: connect: no such file or directory\"","pid":1281,"system":"system","time":"2024-03-23T15:19:27.727Z"+2024-03-23 16:27:55 +0100 -- Restoring repositories ... done 
-{"error":"list repos: walk: rpc error: code = Unavailable desc = last connection error: connection error: desc = \"transport: Error while dialing: dial unix ///run/gitlab/gitlab-gitaly.socket: connect: no such file or directory\"","level":"warning","msg":"failed to list repositories","pid":1281,"storage_name":"default","time":"2024-03-23T15:19:27.728Z"} +2024-03-23 16:27:55 +0100 -- Restoring uploads ...  
-2024-03-23 16:19:27 +0100 -- Restoring repositories ... done +2024-03-23 16:27:55 +0100 -- Restoring uploads ... done 
-2024-03-23 16:19:27 +0100 -- Restoring uploads ...  +2024-03-23 16:27:55 +0100 -- Restoring builds ...  
-2024-03-23 16:19:27 +0100 -- Restoring uploads ... done +2024-03-23 16:27:55 +0100 -- Restoring builds ... done 
-2024-03-23 16:19:27 +0100 -- Restoring builds ...  +2024-03-23 16:27:55 +0100 -- Restoring artifacts ...  
-2024-03-23 16:19:27 +0100 -- Restoring builds ... done +2024-03-23 16:27:55 +0100 -- Restoring artifacts ... done 
-2024-03-23 16:19:27 +0100 -- Restoring artifacts ...  +2024-03-23 16:27:55 +0100 -- Restoring pages ...  
-2024-03-23 16:19:27 +0100 -- Restoring artifacts ... done +2024-03-23 16:27:55 +0100 -- Restoring pages ... done 
-2024-03-23 16:19:27 +0100 -- Restoring pages ...  +2024-03-23 16:27:55 +0100 -- Restoring lfs objects ...  
-2024-03-23 16:19:27 +0100 -- Restoring pages ... done +2024-03-23 16:27:55 +0100 -- Restoring lfs objects ... done 
-2024-03-23 16:19:27 +0100 -- Restoring lfs objects ...  +2024-03-23 16:27:55 +0100 -- Restoring terraform states ...  
-2024-03-23 16:19:27 +0100 -- Restoring lfs objects ... done +2024-03-23 16:27:55 +0100 -- Restoring terraform states ... done 
-2024-03-23 16:19:27 +0100 -- Restoring terraform states ...  +2024-03-23 16:27:55 +0100 -- Restoring packages ...  
-2024-03-23 16:19:27 +0100 -- Restoring terraform states ... done +2024-03-23 16:27:55 +0100 -- Restoring packages ... done 
-2024-03-23 16:19:27 +0100 -- Restoring packages ...  +2024-03-23 16:27:55 +0100 -- Restoring ci secure files ...  
-2024-03-23 16:19:27 +0100 -- Restoring packages ... done +2024-03-23 16:27:55 +0100 -- Restoring ci secure files ... done
-2024-03-23 16:19:27 +0100 -- Restoring ci secure files ...  +
-2024-03-23 16:19:27 +0100 -- Restoring ci secure files ... done+
 This task will now rebuild the authorized_keys file. This task will now rebuild the authorized_keys file.
 You will lose any data stored in the authorized_keys file. You will lose any data stored in the authorized_keys file.
 Do you want to continue (yes/no)? yes Do you want to continue (yes/no)? yes
  
-2024-03-23 16:19:38 +0100 -- Deleting tar staging files ...  +2024-03-23 16:28:04 +0100 -- Deleting tar staging files ...  
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/backup_information.yml +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/backup_information.yml 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/db +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/db 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/uploads.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/uploads.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/builds.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/builds.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/artifacts.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/artifacts.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/pages.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/pages.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/lfs.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/lfs.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/terraform_state.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/terraform_state.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/packages.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/packages.tar.gz 
-2024-03-23 16:19:38 +0100 -- Cleaning up /var/lib/gitlab/backups/ci_secure_files.tar.gz +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/ci_secure_files.tar.gz 
-2024-03-23 16:19:38 +0100 -- Deleting tar staging files ... done +2024-03-23 16:28:04 +0100 -- Deleting tar staging files ... done 
-2024-03-23 16:19:38 +0100 -- Deleting backups/tmp ...  +2024-03-23 16:28:04 +0100 -- Deleting backups/tmp ...  
-2024-03-23 16:19:38 +0100 -- Deleting backups/tmp ... done +2024-03-23 16:28:04 +0100 -- Deleting backups/tmp ... done 
-2024-03-23 16:19:38 +0100 -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data +2024-03-23 16:28:04 +0100 -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data 
 and are not included in this backup. You will need to restore these files manually. and are not included in this backup. You will need to restore these files manually.
-2024-03-23 16:19:38 +0100 -- Restore task is done. +2024-03-23 16:28:04 +0100 -- Restore task is done. 
-2024-03-23 16:19:38 +0100 -- Deleting backup and restore PID file ... done+2024-03-23 16:28:04 +0100 -- Deleting backup and restore PID file ... done
 </code> </code>
  
 +:!: **HINWEIS** - **Die nachfolgende Warnung, kann __ignoriert__ werden, da dies nur für eine __Omnibus__ Installation relevant ist!**
 +  * <code>2024-03-23 16:28:04 +0100 -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data 
 +and are not included in this backup. You will need to restore these files manually.</code>
 +
 +===== GitLab: Dienste/Daemons starten =====
 +
 +Mit nachfolgendem Befehl wird [[https://gitlab.com/|GitLab]] wieder gestartet.
 +
 +Dieser **systemd**-Start beinhaltet auch den Start alle anderen benötigten Komponenten bzw. Dienste/Daemons von [[https://gitlab.com/|GitLab]].
 +
 +<code>
 +# systemctl start gitlab.target
 +</code>
 +
 +Eine Überprüfung, ob der Start des Ziel/Target erfolgreich war, kann mit nachfolgendem Befehl überprüft werden:
 +<code>
 +● gitlab.target - GitLab - Self Hosted Git Management
 +     Loaded: loaded (/usr/lib/systemd/system/gitlab.target; enabled; preset: disabled)
 +     Active: active since Fri 2024-03-22 09:34:35 CET; 30min ago
 +
 +Mar 22 09:34:35 server systemd[1]: Reached target GitLab - Self Hosted Git Management.
 +</code>
  
tachtler/gitlab_archlinux_-_restore.1711211167.txt.gz · Zuletzt geändert: 2024/03/23 17:26 von klaus