realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

Got "no such file or directory" error when migrate data from 1.8.2 to 2.x #306

Closed billwang1990 closed 6 years ago

billwang1990 commented 6 years ago

Goals

I want to migrate all the users' data from ROS 1.8.2 to 2.0.X and I follow all the steps in the upgrading guide.

Expected Results

I expect all the users' data can be migrated from the old version.

Actual Results

I can't no migrate all the users' data, just a part of my users' data can migrated successfully. And I will get the error message error: (node:186) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, lstat '/var/lib/realm-data/0/user_data/ddfb809a4cd92659177994754690f412/xxxxxx.realm'

Steps to Reproduce

Code Sample

The old version ROS 1.8.2 in running in the docker container. and the docker file like this.

FROM ubuntu:16.04
EXPOSE 9080 

RUN apt-get update && \
    apt-get -y install curl && \
    # Setup Realm's PackageCloud repository
    curl -s https://packagecloud.io/install/repositories/realm/realm/script.deb.sh | bash && \
    # Install the Realm Object Server
    apt-get install -y realm-object-server-developer && \
    # Enable the service
    systemctl enable realm-object-server &&\
    apt-get purge -y --auto-remove $buildDeps

COPY configuration.yml /etc/realm/configuration.yml
COPY entrypoint.sh /etc/realm/entrypoint.sh

ENTRYPOINT ["/etc/realm/entrypoint.sh"]

Version of Realm and Tooling

bmunkholm commented 6 years ago

@billwang1990 Are you still experiencing this? If so, could you please post all the commands you use and console output you get?

billwang1990 commented 6 years ago

And more detail is: This two is running in the different docker containers. I copy the realm's data folder from the old one, and then I execute command in the second docker container. The command like below:

mkdir -p /srv/new-root # should be an empty dir
ros migrate --from /srv/old-root --to /srv/new-root/ --copyrealms

And from the console output I can found that the migration tool already migrate a lot of user's realm data. But at last it will show the error message!

bmunkholm commented 6 years ago

@billwang1990 Really sorry this wasn't dealt with. I assume you have gotten over this somehow by now?

astigsen commented 6 years ago

Closing this for now as it relates to an outdated version of ROS and we have not heard anything from the user for months.