Skip to content

Instantly share code, notes, and snippets.

@smira
Created April 4, 2014 15:34
Show Gist options
  • Save smira/9977194 to your computer and use it in GitHub Desktop.
Save smira/9977194 to your computer and use it in GitHub Desktop.
recover aptly db
package main
import (
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage"
"log"
)
func main() {
stor, err := storage.OpenFile("/Users/smira/.aptly/db/")
if err != nil {
log.Fatal(err)
}
db, err := leveldb.Recover(stor, nil)
if err != nil {
log.Fatal(err)
}
db.Close()
stor.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment