Kong version is 1.0.3 - dump works perfectly.
In my current setup I have only services and routes. Then I installed a brand new Kong 1.0.3 with empty DB.
[WARNING] Request for POST - http://localhost:8001/routes/ gets response StatusCodeError: 400 - {"message":"the foreign key '{id=\"50378d08-0238-4bd9-980b-ad819ea6ff08\"}' does not reference an existing 'services' entity.","name":"foreign key violation","fields":{"service":{"id":"50378d08-0238-4bd9-980b-ad819ea6ff08"}},"code":4} but NOT 2xx
[WARNING] Request for POST - http://localhost:8001/routes/ gets response StatusCodeError: 400 - {"message":"the foreign key '{id=\"c1b79ab9-2227-47f4-b56f-e51e7a026e35\"}' does not reference an existing 'services' entity.","name":"foreign key violation","fields":{"service":{"id":"c1b79ab9-2227-47f4-b56f-e51e7a026e35"}},"code":4} but NOT 2xx
And the reason is quite clear: it tries to create routes before services were created and it can't match IDs. As I could see after apply it does same function like dump - it gets current setup and as result it deletes all routes that were not created, so running kcm apply again doesn't help. I have to stash git changes and only after that I get things working.
I guess the right approach is to run services requests first, then routes after it's done, then plugins.