ODK Central Restore

1. What is the problem? Be very detailed. Can't restore ODK Central backup, "file not found"

2. What app or server are you using and on what device and operating system? Include version numbers. Ubuntu 20.4, ODK Central 1.2

3. What you have you tried to fix the problem?

4. What steps can we take to reproduce the problem?
Put a copy of the Google zip file on /data/transfer
mv /root/backup-2022-01-11T20:00:00Z.zip /data/transfer/
Next tried to restore
cd central
docker-compose exec service node /usr/odk/lib/bin/restore.js /data/transfer/backup-2022-01-11T20:00:00Z.zip 'MY_SECRET'

Error: File not found
Path: /data/transfer

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

What do you get when you run find /data/?

I expect to see this:

$ find /data
/data/
/data/transfer
/data/transfer/backup-2022-01-11T20:00:00Z.zip

Hi Yanokwa,

Thanks for your quick respons.
This is my screen output:

root@pps2:/home/tupola/central# find /data
/data
/data/transfer
/data/transfer/backup-2022-01-07T04_05_05.358Z.zip

But when trying to restore, it is still unable to find the file:

root@pps2:/home/tupola/central# docker-compose exec service node /usr/odk/lib/bin/restore.js /data/transfer/backup-2022-01-07T04_05_05.358Z.zip 'OUR_Secret'
[Error: ENOENT: no such file or directory, open '/data/transfer/backup-2022-01-07T04_05_05.358Z.zip'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/data/transfer/backup-2022-01-07T04_05_05.358Z.zip'
}

Hope you know how to resolve this problem?

Cheers,

Marcel

Our QA team tests backups and restores. Further, I've confirmed that this works on my Central v1.3 as documented. The issue is very likely with your machine.

What version of Docker are you running?

$ docker --version

Docker version 20.10.12, build e91ed57

Maybe you changed Central in some way? What happens if you run the following?

$ cd ~/central
$ git status

Maybe there is a permissions issue? Try the namei command below and paste your output.

$ namei -mo /data/transfer/*.zip

 drwxr-xr-x root root /
 drwxr-xr-x root root data
 drwxr-xr-x root root transfer
 -rw-r--r-- root root central-backup-2022-01-26T22_56_52.132Z.zip

Hi Yanokwa,

After updating to 3.3 on a cloned server, it worked fine.
Thanks,

Marcel

1 Like