Suppress gitlab-backup restore prompt

**

  • Describe your question in as much detail as possible:
    I’m attempting to automate the testing of my backups against my QA environment by automating the restore. However, the issue i’m running into is the prompt that happens when issuing the gitlab-backup restore BACKUP=filename command, asks ‘Do you want to continue (yes/no)?’ I want to suppress that prompt so Ansible can take care of testing the restore for me. -s and -q don’t seem to accomplish this.
    Is there a way to suppress that prompt?

  • Consider including screenshots, error messages, and/or other helpful visuals

[root@/data/gitlab/backups]# gitlab-backup restore BACKUP=1585728901_2020-04-01_12.8.5-ee -q -s
Unpacking backup ... done
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)?
  • *What version are you on (Hint: /help) ? Self-managed 12.8.5-ee on both source and target systems.

  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been? Looked through the --help docs, don’t see any other relevant flags.

1 Like

As I read the code it’s not possible.

But it probably wouldn’t be hard to implement, and I can understand the use case (and that probably mean others can too). My suggestion is to file an issue, and hope somebody finds it worth fixing.

2 Likes

Add force=yes to the restore command:

gitlab-backup restore BACKUP=1585728901_2020-04-01_12.8.5-ee force=yes