[doc] Clarify backup instructions

Issue #125 new
Matthias Kauer created an issue

Hi, I just began setting up my own Kallithea server and now I'm looking to setup a backup that transfers the most important content to my home computer. The documentation only states that I should save my .ini and my database. My ini is clear, the sqlite is stored in my repository folder, I suppose (I had tinkered with this a bit before I had it running, so now it's a bit confusing). The whoosh index is supposed to be in my install folder. I installed via pip to a virtualenv. Is it really deep in the site-packages now? Is this index crucial or can it be rebuilt?

Finally, what am I supposed to do with the repositories themselves? Just archive the whole folder (possibly after kallithea stop to unlock the db)?

Comments (6)

  1. Thomas De Schampheleire

    @matthias_kauer Sorry for the very late response...

    The whoosh index can indeed be rebuild, but can take some time for large repositories. If immediate restore after failure is important for you, you should probably backup the index too (not sure if there are gotchas here).

    The repository hierarchy should be kept the same after restore, because the database refers to these repositories. Archiving the entire folder sounds like a valid solution.

    @kiilerix Do you have more experience or tips in this area?

  2. Matt Anderson

    So is it possible to regenerate the repos folder structure from the database file alone? If I have a valid .db file and an empty repos folder all the repositories show up on the front page but when I click on them I get 404. Rescan in settings does not seem to change this.

  3. Mads Kiilerich

    "Folders" ("repository groups") only serve as groups of repositories. Empty folders without repositories will not be picked up by scanning.

    If your database reference repositories that doesn't exist in the file system, then you have problems. You should restore the repositories first.

    But I guess it safely and kind of sanely could create folders that exist in the database but not in the filesystem.

  4. Matt Anderson

    Ok so I think you are saying that the kallithea.db itself is not sufficient to restore everything.

  5. domruf

    The repositories re not stored in the database (only meta data). So yes, you need to backup the repository files system directory as well as the database.

  6. Log in to comment