Photos not found after restoring Central backup

1. What is the issue? Please be detailed.
I restored a google drive backup of ODK central from May of 2021. The backup file was approximately 1 GB in size and contained approximately 170 photos associated with a single form's submissions. After restoring the backup I am able to view all the submissions, but when I try to download "all data and media files" it simply returns the CSV with the submissions and no media files. When I click on the photo icon in the submissions table it says

{"message":"Could not find the resource you were looking for.","code":404.1}

3. What have you tried to fix the issue?
I tried changing the digital ocean droplet to 4gb memory as suggested here but that hasn't helped

4. Upload any test forms or screenshots below.

Sorry to hear of this issue, it's not one that we've seen before.

Do you know what Central version you pulled the backup from? What Central version did you restore to? It should theoretically be possible to restore to newer Central versions but it's not something that we verify.

All submission attachments are stored in a database table named blobs. It would be helpful to know how many rows that restored table has and how much space it takes up. This will give us an idea of whether it was restored correctly. To figure this out:

  1. SSH into your server
  2. Connect to the Central database:
    docker exec -it central_postgres_1 psql -U odk -W odk
  3. SELECT pg_size_pretty(pg_total_relation_size('blobs'));
  4. SELECT count(*) from blobs;

You should first get a size in MB and then a count. Please let us know what both of those are.

Thanks for the reply Helene!
I pulled the backup from either v0.9 or 1.0 (unfortunately I can't remember for sure)
and I restored to v 1.5.3

Here's what I got with the postgres commands
image

@craigdsouza I think what might be easiest at this stage is if we get access to the Google Drive backup. I will send you an email so we can coordinate that process and update this public topic once we have a resolution.

1 Like