Help restoring my self hosted hypothesis backup #10005
Replies: 1 comment
-
|
Ok, I think I got it. It's kinda of a broken process but it works. I'm sure there must be an easier way to do it I just can't find it. I'm leaving the steps here so I don't forget: (If you are like me and you are running a local instance of hypothesis, you did a backup and now want to restore it, maybe this can be useful to you)
docker compose exec -T postgres psql -d postgres -U postgres < '~/PKM/data/sql/hypothesis/dumpfile'
docker compose up -d
make dev
Remember to login first with your user and password.
Reindexing the annotations like that will still not show them on your landing page:
pyenv exec tox -qe dev -- sh bin/hypothesis --dev celery call --args '[100000]' h.tasks.indexer.sync_annotationsWait a few seconds (depending on the size of your data), refresh and now all the annotations from your backup should be there. If not, restarting all the docker services (postgres, elasticsearch, rabbitmq) might help. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I "self hosted" hypothesis on my own laptop (I crafted this ansible playbook to do so: link to file)
I'm not entitled to receive any support from hypothesis but I just wanted some direction on how to restore a backup that I did of my local data.
I have 2 kind of backups:
/usr/bin/bash -c "docker compose exec postgres pg_dump postgres -U postgres > ~/PKM/data/sql/hypothesis/dumpfile".jsonfile through the API.I formatted my machine and now I need to import either my database backup or my exported
.jsonfile backup...I didn't find any docs related to backups on the source code. Could you recommend me anything?
Performing
docker compose exec -T postgres psql -d postgres -U postgres < '~/PKM/data/sql/hypothesis/dumpfile'seems to work, I got my user and groups, but groups have 0 annotations...maybe there's a step I'm missing?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions