Skip to content

Text special symbol "\" in data is turned into "\\" in mongo migration #1643

@AndrewKeplinger

Description

@AndrewKeplinger

Working on step one of migration from Parse to mLab server. This is just the first step. Stepped through the migration process. Our data contains text symbols in the descriptions which render out special symbols beginning with a \ character. When the data is migrated to a mongo db on mLabs additional \ are added and apparent when viewing the resulting migration.

Only the data has been migrated to mongo, so parse.com is still being used as a conduit. No other changes have been made, and the duplicated \ (double slashes not rendering in this system) is immediately apparent in the cloned data.

Directly calling Parse php calls to update the data in the mongo tables also introduces the same double \ in the data.

Environment Setup

Followed tutorial for migration of database from Parse to mLab up to the point where we finalized the connection, using a duplicate of our main project.

Steps to reproduce

You should be able to see this problem by including something like this in a string field migrated from Parse.

> somedata\u0026reg; moredata\u0026reg;

The destination data will appear:

> somedata\\u0026reg; moredata\\u0026reg;

Logs/Trace

No errors or crashes reported or pertinent log statements to note here.

My guess is that some function for adding backslashes to data is getting called more than once. Our workaround on the client side would be to replace all \\with \, but maintaining data integrity is preferable.

Is it possible that this is a mLab mongo setting on import that can be turned off?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions