From time to time we get a question from users: how can I move data from one Edge organization into another? Or, how can I backup my configuration so that I could restore it at a later point?
For this purpose we have created the "Apigee Organization Data Migration Tool"! Find it on github:
https://github.com/apigeecs/apigee-migrate-tool
Typical Use Cases :
Features
For installation and usage instructions please visit - https://github.com/apigeecs/apigee-migrate-tool
And please do provide feedback on the tool via github. We accept pull requests and issue reports of course!
@shah do you know if this tool is officially supported. If a customer rans into any issues using this tool, whom do they reach to?
@Divya Achan - This tool is not officially supported by Apigee. It is an open source tool under MIT license terms. Customer is free to use it at risk.
Thank you @shah for writing awesome tool.
This is big help to get or transfer data from one org to another org.
Only one question : How do I pass my both org URL in config.js ?
I did 'https://api.enterprise.apigee.com/v1/organizations/{org-name}'
But, it's give me an error. I am wrong somewhere in url but, don't know where? Could please help me out here.
Thank you.
The org-name would go in the org field in the corresponding from and to section. The url would be the same if both orgs are in Apigee Edge cloud.
The config.js would look like below
from: { version: '14.01', url: 'https://api.enterprise.apigee.com', userid: '{userid}', passwd: '{password}', org: '{org1}', env: 'test' },
to: { version: '15.01', url: 'https://api.enterprise.apigee.com', userid: '{userid}', passwd: '{password}', org: '{org2}', env: 'test' }
Thank you @shah
But, my config.js is like this:
module.exports = { from:
{ version: '1',
url: 'https://api.enterprise.apigee.com’,
userid: 'userid’,
passwd: 'pass',
org: 'dhwani-prod',
env: 'dev' },
to: {
version: '1',
url: 'https://api.enterprise.apigee.com’,
userid: 'userid’,
passwd: 'pass',
org: 'dhwani',
env: 'dev' }
} ;
I am getting error on my url: "Unexpected token ILLEGAL"
Do you think instead of http protocol , I am using https so, that is causing trouble?
No. Definitely works with https. It is not able to parse the url from config.js. I pasted your config in an editor. The end quote of the url field is bad 🙂
This definitely looks like a promising tool. Based on what I see above, I had the following questions:
- Does this tool allow migration of environments, virtualhosts, keystores etc ?
- Does the tool have support for migrating org/env level resources like resource files, cache resources, target servers etc ?
Apart from developers, apps, keys and proxies, these are major resources which a customer would like to migrate from their free org to paid orgs, or non-prod to prod orgs.
Arghya - This is currently not supported and something I plan to add to the tool. Also pull requests are welcome 🙂
Thank you for this wonderful tool. 🙂
@shah thanks for the wonderful article.
Is there a way by which OPDK users can move data into a new org? I understand that one will have to create a new org and migrate data into that.
Is there a set of procedures/guidelines supported by Apigee in order to accomplish this?
The tool uses management API's and works for both opdk and cloud deployments. The opdk installation guide covers how to create orgs, env etc. There is a script setup-org.sh with the opdk, which can be used to create a new org, environment, roles, users etc.
let me start with thanking you @shah for creating this tool. This has helped me a lot to get my data from the ancient version of Apigee planet to 15.01 Apigee planet.
Now here comes the question:
Hi Satyajit,
See my responses below ..
Is there a way to migrate data from one ORG to another ORG based on following conditions:
So you mean that below is possible:
module.exports = { from: { version: 'r23', url: 'http://Source-MGMT-IP:PORT', userid: 'Username', passwd: 'Password', org: 'ORG', env: 'SOURCE-ENV' }, to: { version: '15.01', url: 'http://Destination-MGMT-IP:PORT', userid: 'Username', passwd: 'Password', org: 'ORG', env: 'DESTINATION-ENV' } } ;
As long as I have "DESTINATION-ENV" already created. This should work...
Yes. It should work.
@shah quick question about the migration. May be it is a dumb question but I am fairly new to Aigee. Does proxy police's order matters ? After I moved data from my old planet to new planet. I have been seeing that the ordering for the policy is changed. Also " are not ". Old instances use to show double quotes as """.
By "Does proxy police's order matters ?" - you mean the order of policies used within a proxy bundle ? It could matter depending on what you do in your proxy.
The tool does not update the proxy bundle it just exports and imports the bundle as it is. So the order of polices within the bundle are not changed by the migration tool.
@shah quick question, in process of building new prod system. I have to do clean up multiple times. But even if I delete everything [means delete VH, ENV and ORG as well], and re-run
setup-org.sh
to create new ORG, ENV and VH. I get this error
--> curl -X POST http://{MGMT}:{PORT}/v1/organizations/{ORG}/environments/prod/analytics/admin?type=organizations [...] { "code" : "Scope ORG~prod already registered in group axgroup001", "message" : "Scope ORG~prod already registered in group axgroup001", "contexts" : [ ] } ==> 400 ERROR: Analytics onboard for ORG/prod failed. Continue anyhow y/(n) y
I understand that it is complaining about the analytics POD. What steps are required to fix this and how do I make sure that it is working.
Hi Shah,
Following errors are observed while migrating the keys,can you please help
>> ERROR Resp [500]
>> "code" : "keymanagement.service.invalid_apiproduct_for_key",
>> "message" : "ApiProduct named <API Product Name> is not associated with the given key",
Thanks for the help.
Regards
you can check this post maybe its help you its all about ip address and i solved my problem of th same " restrictions do I face when using 192.168.2.1 "