Kallithea issues archive

Issue #125: [doc] Clarify backup instructions

Reported by: Matthias Kauer
State: new
Created on: 2015-04-19 07:38
Updated on: 2017-09-13 15:26


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)?



Comment by Thomas De Schampheleire, on 2015-08-06 20:04

@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?

Comment by Mads Kiilerich, on 2015-08-06 20:14

No, indexing doesn't scale to our use and I have disabled it.

Comment by Matt Anderson, on 2017-09-11 16:47

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.

Comment by Mads Kiilerich, on 2017-09-13 01:49

"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.

Comment by Matt Anderson, on 2017-09-13 02:06

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

Comment by domruf, on 2017-09-13 15:26

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.