Recovering repos from crashed gitlab

omnibus

#1

Hello
I have a gitlab installation which is crashed yesterday due to power outage.
file system and postgresql db was crashed, so I managed to recover the FS but postgresql is too much damaged and it is unrecoverable.
now I have setup a new gitlab server, copied git repository storage from old server file system and want to push latest state of repos to new server but it seems the files I copied, are not valid repos.
Is there any way to recover repositories from files?
or any other place I can get them?
unfortunately our backup was 3 months old and we don’t have access to all developers having repo on their machine.


#2

I don’t have an answer to data recovery and this may be a situation where a data recovery firm would be better suited to helping you. Maybe someone here has better knowledge than I do on data recovery.

As for backups I configured GitLab’s backup system to run on a cronjob and to upload them to Amazon S3 Glacier ($0.004/GB/Month it’s cheap but with high retrieval fees). Automated backups might be a good idea for the future. File system crashes suck, but ask any data recovery firm and they’ll tell you recovery isn’t always possible, regular backups are essential.

I’m sorry to hear this happened and I hope you’re able to find a solution and at least get most of your data back :-/