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:11] – [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 98: Zeile 107:
 Der nachfolgende Befehl, führt dann den **Restore** von [[https://gitlab.com/|GitLab]] aus: Der nachfolgende Befehl, führt dann den **Restore** von [[https://gitlab.com/|GitLab]] aus:
 <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_gitlab_backup.tar+# 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_gitlab_backup.tar +# sudo -u gitlab $(cat environment | xargs) bundle exec rake gitlab:backup:restore RAILS_ENV=production BACKUP=1711175567_2024_03_23_16.9.
-2024-03-23 16:11:03 +0100 -- The backup file 1711175567_2024_03_23_16.9.2_gitlab_backup.tar_gitlab_backup.tar does not exist! +2024-03-23 16:27:29 +0100 -- Unpacking backup ...  
-2024-03-23 16:11:03 +0100 -- Deleting backup and restore PID file ... done+2024-03-23 16:27:29 +0100 -- Unpacking backup ... done 
 +2024-03-23 16:27:29 +0100 -- Restoring database ...  
 +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 
 +installs, see the following link for more information: 
 +https://gitlab.tachtler.net/help/raketasks/backup_restore.html#restore-for-omnibus-gitlab-installations 
 + 
 +Before restoring the database, we will remove all existing 
 +tables to avoid future upgrade problems. Be aware that if you have 
 +custom tables in the GitLab database these tables and all data will be 
 +removed. 
 + 
 +Do you want to continue (yes/no)? yes 
 +Removing all tables. Press `Ctrl-C` within 5 seconds to abort 
 +2024-03-23 16:27:39 +0100 -- Cleaning the database ...  
 +2024-03-23 16:27:41 +0100 -- done 
 +Restoring PostgreSQL database gitlabhq_production ... SET 
 +SET 
 +SET 
 +SET 
 +SET 
 + set_config  
 +------------ 
 +  
 +(1 row) 
 + 
 +SET 
 +SET 
 +SET 
 +SET 
 +ALTER TABLE 
 +... 
 +DROP TRIGGER 
 +... 
 +DROP INDEX 
 +... 
 +ALTER TABLE 
 +... 
 +DROP SEQUENCE 
 +DROP TABLE 
 +... 
 +DROP FUNCTION 
 +... 
 +DROP TABLE 
 +... 
 +CREATE SCHEMA 
 +ALTER SCHEMA 
 +COMMENT 
 +CREATE SCHEMA 
 +ALTER SCHEMA 
 +COMMENT 
 +CREATE EXTENSION 
 +COMMENT 
 +CREATE EXTENSION 
 +COMMENT 
 +CREATE FUNCTION 
 +ALTER FUNCTION 
 +CREATE FUNCTION 
 +ALTER FUNCTION 
 +CREATE FUNCTION 
 +ALTER FUNCTION 
 +SET 
 +SET 
 +... 
 +CREATE TABLE 
 +ALTER TABLE 
 +CREATE FUNCTION 
 +... 
 +CREATE SEQUENCE 
 +ALTER SEQUENCE 
 +ALTER SEQUENCE 
 +... 
 +COPY 0 
 +COPY 16 
 +COPY 0 
 +... 
 + setval  
 +-------- 
 +      1 
 +(1 row) 
 +... 
 +ALTER TABLE 
 +... 
 +CREATE INDEX 
 +... 
 +ALTER INDEX 
 +... 
 +CREATE TRIGGER 
 +... 
 +ALTER TABLE 
 +[DONE] 
 +Source backup for the database ci doesn't exist. Skipping the task 
 +2024-03-23 16:27:55 +0100 -- Restoring database ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring repositories ...  
 +2024-03-23 16:27:55 +0100 -- Restoring repositories ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring uploads ...  
 +2024-03-23 16:27:55 +0100 -- Restoring uploads ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring builds ...  
 +2024-03-23 16:27:55 +0100 -- Restoring builds ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring artifacts ...  
 +2024-03-23 16:27:55 +0100 -- Restoring artifacts ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring pages ...  
 +2024-03-23 16:27:55 +0100 -- Restoring pages ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring lfs objects ...  
 +2024-03-23 16:27:55 +0100 -- Restoring lfs objects ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring terraform states ...  
 +2024-03-23 16:27:55 +0100 -- Restoring terraform states ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring packages ...  
 +2024-03-23 16:27:55 +0100 -- Restoring packages ... done 
 +2024-03-23 16:27:55 +0100 -- Restoring ci secure files ...  
 +2024-03-23 16:27:55 +0100 -- Restoring ci secure files ... done 
 +This task will now rebuild the authorized_keys file. 
 +You will lose any data stored in the authorized_keys file. 
 +Do you want to continue (yes/no)? yes 
 + 
 +2024-03-23 16:28:04 +0100 -- Deleting tar staging files ...  
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/backup_information.yml 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/db 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/uploads.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/builds.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/artifacts.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/pages.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/lfs.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/terraform_state.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/packages.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Cleaning up /var/lib/gitlab/backups/ci_secure_files.tar.gz 
 +2024-03-23 16:28:04 +0100 -- Deleting tar staging files ... done 
 +2024-03-23 16:28:04 +0100 -- Deleting backups/tmp ...  
 +2024-03-23 16:28:04 +0100 -- Deleting backups/tmp ... done 
 +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. 
 +2024-03-23 16:28:04 +0100 -- Restore task is 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.1711210313.txt.gz · Zuletzt geändert: 2024/03/23 17:11 von klaus