-
Looks like OneDev can not find the database upon upgrade. Please make sure you are mounting correct volumes.
-
Hi, stopped and removed old image and started new one but it won't boot.
In the mounted volume, file onedev/logs/check-data-version.log there is an error: "ERROR - Database is not populated yet"
Do you know what caused this, and is there a way to recover?
To add on, make sure you mounted a volume for the onedev database. If you just started the docker container without doing that, you database will have been lost as containers are not virtual machines, they are mean to be started and stopped without saving data on them.
If you post your commands or docker-compose file taking out any sensitive information I can assist.
-
I am deploying via ansible. I am using the same script for months now - I only bumped the version when there is a new release. I moved the persistent folder to a different path and re-run the script. Basically a brand new installation - it started right up. So the location is correct.
- hosts: main vars_files: - 'secrets.yml' - '../../common_vars.yml' - 'vars.yml' tasks: - name: Remove existing container community.general.docker_container: name: "{{ ONEDEV_CONTAINER_NAME }}" state: absent - name: Start container remote_user: "{{ remote_username_normal }}" community.general.docker_container: container_default_behavior: no_defaults networks_cli_compatible: yes name: "{{ ONEDEV_CONTAINER_NAME }}" image: "1dev/server:{{ ONEDEV_VERSION }}" command: "" state: started recreate: yes detach: yes restart_policy: unless-stopped env: initial_user: "{{ remote_username_normal }}" initial_password: "{{ initial_password }}" initial_email: "{{ initial_email }}" initial_server_url: "https://{{ SERVER_DOMAIN }}" volumes: - /var/run/docker.sock:/var/run/docker.sock - "{{ ONEDEV_PERSISTENT_PATH }}:/opt/onedev" network_mode: "host" -
For your
{{ ONEDEV_PERSISTENT_PATH }}Can you do a
ls -lahto confirm the database is intact? -
Not sure how to check the database for integrity. The files are there. I moved {{ ONEDEV_PERSISTENT_PATH }} to {{ ONEDEV_PERSISTENT_PATH }}_backup and executed the script again. {{ ONEDEV_PERSISTENT_PATH }} is regenerated and onedev starts just fine but of course my projects are missing.
-
It seems you are executing the script on the vm/physical server.
Can you use the official OneDev docker container, mount the directory and backup inside the container and run the restore?
If you need assistance with the commands, let me know.
-
I will try to use the restore script and if that doesn't work I will re-create projects from scratch (fortunately just a few). Thanks for the help!
-
You're welcome. If you need any more assistance, please update this issue.
-
Name Previous Value Current Value Assignee
robin
crobinson
-
@kdop you may also start onedev with below command to see what happens:
docker run --name onedev -it -v <onedev data dir>:/opt/onedev -p 6610:6610 1dev/server:10.9.7 -
Previous Value Current Value Open
Closed
-
Please reopen if there is more info
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Hi, stopped and removed old image and started new one but it won't boot.
In the mounted volume, file onedev/logs/check-data-version.log there is an error: "ERROR - Database is not populated yet"
Do you know what caused this, and is there a way to recover?