Backup docs

A few small bugfixes in scripts, plus documentation on how to restore from backup, and how to recreate the indexes.