Moving MongoDB from Windows to Ubuntu, filename issues

41 views
Skip to first unread message

Marcos Bortolussi

unread,
Jul 22, 2016, 3:39:29 PM7/22/16
to mongodb-user
Hi, i'm trying to move a MongoDB database from a Windows environment to Linux Ubuntu 14.04.
Some collections are files named like "Vehículos.metadata.json.gz". Notice that the i has an accent.

When I type ls i see something like:

 -rw-rw-r-- 1 Marcos Marcos     103 jul 22 16:01 u_Veh?culos.metadata.json.gz

The problem is that when i try to run mongorestore it crahses on those files.

    Failed: RTV.Veh▒culos: error creating collection RTV.Veh▒culos: error running create command: 22: Invalid argument

I already changed locale to "es_AR.utf8"
I don't know if it's a problem with Linux, the original file or the mongorestore.

Any ideas?

William Hagan

unread,
Jul 24, 2016, 3:59:33 AM7/24/16
to mongodb-user
Have you tried enclosing the filename in quotes?

Marcos Bortolussi

unread,
Jul 25, 2016, 5:09:02 PM7/25/16
to mongodb-user
I renamed de files manually using the same characters of the original files and it worked. 
Aparently it's a Linux compatibility issue.

Thanks anyway!
Reply all
Reply to author
Forward
0 new messages