Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab: Force non-interactive restore from backups?

Tags:

gitlab

Is there a way to force a 'yes' to the question:

This will rebuild an authorized_keys file.
You will lose any data stored in authorized_keys file.
Do you want to continue (yes/no)?

When trying to restore from backups? I create a backup on server A, copy to my mirror on Server B and want to restore via a script on a cronjob.

I am running

Gitlab 6.2
GitLab Shell version >= 1.7.4 ? ... OK (1.7.9)
like image 814
slowko Avatar asked Dec 02 '13 09:12

slowko


3 Answers

With this syntax should work:

sudo gitlab-rake gitlab:backup:restore BACKUP=<BACKUP_ID> force=yes
like image 114
Andrés Cuadros Avatar answered Oct 19 '22 07:10

Andrés Cuadros


Yes; set the environment variable force to yes for the rake process.

like image 36
Ash Wilson Avatar answered Oct 19 '22 06:10

Ash Wilson


Similar to both Ash Wilson's and Andrés Cuadros Suárez's answers, I found the following also works (prepend with sudo if required)

gitlab-backup restore force=yes
like image 34
Loftx Avatar answered Oct 19 '22 05:10

Loftx