简体   繁体   English

如何从备份中恢复 gitlab wiki

[英]How to recover gitlab wiki from backup

We have damaged server, where our gitlab was running.我们损坏了运行 gitlab 的服务器。 Also we have had a backup, which is stored locally now.我们也有一个备份,现在存储在本地。 However, it turns out, that backup has had some damaged files, so we are not able to recover from it.但是,事实证明,该备份有一些损坏的文件,因此我们无法从中恢复。 There is no problem with repo, however gitlab's wiki contains a lot of useful information. repo 没有问题,但是 gitlab 的 wiki 包含很多有用的信息。 I've already run printf "%s\n" "$src/@hashed"/*/*/* | grep '\.wiki\.git$'我已经运行printf "%s\n" "$src/@hashed"/*/*/* | grep '\.wiki\.git$' printf "%s\n" "$src/@hashed"/*/*/* | grep '\.wiki\.git$' and found out, that backup contains a lot of hashed files with our wiki. printf "%s\n" "$src/@hashed"/*/*/* | grep '\.wiki\.git$'并发现,该备份包含我们 wiki 的大量散列文件。 Is there a way to translate them or move to our new empty gitlab?有没有办法翻译它们或转移到我们新的空 gitlab 中?

backup contains a lot of hashed files with our wiki.备份包含我们 wiki 的大量散列文件。 Is there a way to translate them or move to our new empty gitlab?有没有办法翻译它们或转移到我们新的空 gitlab 中?

Yes, see https://docs.gitlab.com/ee/administration/repository_storage_types.html#from-hashed-path-to-project-name about the name/path hashing.是的,请参阅https://docs.gitlab.com/ee/administration/repository_storage_types.html#from-hashed-path-to-project-name关于名称/路径散列。

Alternatively , if the wiki's companion project is not damaged, you can run grep 'fullpath' config in its @hashed/…/…not…wiki….git folder. 或者,如果 wiki 的配套项目没有损坏,您可以在其@hashed/…/…not…wiki….git文件夹中运行grep 'fullpath' config

Either way, it should be possible to git clone the .bundle files, thus generating a normal repo from them, which you can push again to a new wiki, or extract the file content from.无论哪种方式,都应该可以git clone .bundle文件,从而从中生成一个正常的 repo,您​​可以将其再次推送到新的 wiki,或从中提取文件内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM