Revert "broken" project deletion

Hello,

I accidentally deleted a project but the background job did not completed.
The project is still there and seems fine except there is a message shown “This project was scheduled for deletion, but failed with the following message: execution expired”.

How can I get rid of this message?

Thanks,
Tom

How can you accidently delete it when it clearly asks you “are you sure you want to do this?” and have to actually physically fill in the project name to do it.

On Gitlab.com as well as people who have Gitlab installed themselves on their own servers/vps (self managed) and have a subscription have delayed deletion which gives them a certain amount of time to cancel the deletion process before it starts.

You don’t mention if you are deleting on Gitlab.com or if you were deleting on your own Gitlab installation? You don’t mention if you have a subscription, so am guessing you are a free user who clicked the delete button. In such a case, it’s clear as the message:

I think you will have to delete it properly from your Gitlab server, and commit the project again as a new one. Or maybe even restore your server from a backup if you have one? That would be the preferred option, restore from backup before you made the deletion. However, any changes you have made on your other projects since then, will have to be re-commited, added manually, etc.

If you cannot restore from a backup, or don’t want to for some reason, then I think you can only delete it fully, and then create a new project with the same name, and push all your commits to it. But you will lose issues, wiki, etc.

Obviously a flag has been set on the project, and I don’t see any API option available that would allow you to remove it and remove the message displayed.

Thanks, appreciate your answer! And I see I should have given more details…

  • The project was deleted by an API call
  • Self Hosted Gitlab 14.10.5
  • Premium Plan

Unfortunately I cannot restore the whole server. I need to be able to restore just this single project.
Guess I can do a restore on a new instance export the project and import on the old instance.

If you have premium, then this option would have been available: GitLab.com settings | GitLab

That said, depending on the API call, yeah maybe it was over-ridden and deleted immediately. Breaking the batched job was probably not the best way to go about it at that point though.

Since you have premium you can open a support ticket with Gitlab directly and ask them, it would be far quicker than asking on the forums: https://support.gitlab.com/hc/en-us/requests/new

However, I expect you are right, create a new server, restore your instance there according to the restore docs (don’t forget gitlab.rb and gitlab-secrets.json). There you can export the project, and then import it on the existing server.