Can branches be restored once they're deleted?
# help
s
Can branches be restored once they're deleted?
g
Hey @Sid Senthilnathan, There is no command to restore a branch, however If you do have a way to find the
commitID
that was the head of your branch, you could create a new branch with the same name using the
commitID
as the source.
s
Is there a suggested way of finding the commitIDs of branches that have been deleted?
In the UI at least, the only commits that show up are on active branches
g
You have no way of finding that commit using the UI because there is no branch/tag pointing to that commit now. let me see if I could think of way to find it
I could provide an SQL query to narrow down the potential commits that where the reference to the branch you’r looking for, do you have access to the database instance your lakeFS installation is using?
s
Ah I see. I don't need a working example, I was just wondering what the approach would be, and it looks like there isn't an easy way for users of Lakfes to do it (an admin with access to the db would have to query the commits)
g
Excellent point! I opened this issue in order to provide an easy way for lakeFS users Thanks 🙏
🙌 1
s
Wonderful, thanks! This would help with our use cases, we'd like to have auditable records of our data