Creating a backup of the Eclipse Amlen messaging server
System administrators can create a secure backup of the Eclipse Amlen messaging server by using REST Administration APIs and standard system tools.
- To ensure consistency of the backup, perform the backup procedure while the Eclipse Amlen server is in maintenance mode.
- If your server is a member of a cluster:
- Ensure that you back up the configuration data and store data.
- To avoid a conflict, do not start a server by using the backed-up data while the original server is still running.
- Do not disable cluster membership while you are backing up your server. Disabling cluster membership causes the store to be emptied.
System administrators can create a secure backup that can be used to restore the Eclipse Amlen configuration and store data. Both of these sets of data are in directories in your file system and can be backed up by using standard system tools. Configuration data and store data can be backed up together or separately.
Check
that the server is running:
[admin@localhost ~]$ curl -X GET http://127.0.0.1:9089/ima/v1/service/status { "Version":"v1", "Server": { "Name": "TestSystem:9089", "UID": "aFWxYf32", "Status": "Running", "State": 1, "StateDescription": "Running (production)", "ServerTime": "2016-03-04T14:46:53.081Z", "UpTimeSeconds": 4134, "UpTimeDescription": "0 days 1 hours 8 minutes 54 seconds", "Version": "2.0 20160304-0400", "ErrorCode": 0, "ErrorMessage": "" }, "Container": { "UUID":"034c91ce828a4f5c2c21d7cd7f04628368b63bd308825ec2d9dab5096ff04ca0" }, "HighAvailability": { "Status": "Inactive", "Enabled": false }, "Cluster": { "Status": "Inactive", "Enabled": false }, "Plugin": { "Status": "Inactive", "Enabled": false }, "MQConnectivity": { "Status": "Active", "Enabled": true }, "SNMP": { "Status": "Inactive", "Enabled": false } }
Set the server to maintenance mode:
[admin@localhost ~]$ curl -X POST \ > -H 'Content-Type: application/json' \ > -d '{ > "Service": "Server", > "Maintenance": "start", > } > ' \ > http://127.0.0.1:9089/ima/v1/service/restart [admin@localhost ~]$ curl -k -H "Content-Type: application/json" -X GET https://127.0.0.1:9089/ima/v1/service/status { "Version":"v1", "Server": { "Name": "TestSysem:9089", "UID": "aFWxYf32", "Status": "Running", "State": 9, "StateDescription": "Running (maintenance)", "ServerTime": "2016-03-04T14:46:53.081Z", "UpTimeSeconds": 4140, "UpTimeDescription": "0 days 1 hours 8 minutes 57 seconds", "Version": "2.0 20160304-0400", "ErrorCode": 0, "ErrorMessage": "" }, "Container": { "UUID":"034c91ce828a4f5c2c21d7cd7f04628368b63bd308825ec2d9dab5096ff04ca0" }, "HighAvailability": { "Status": "Inactive", "Enabled": false }, "Cluster": { "Status": "Inactive", "Enabled": false }, "Plugin": { "Status": "Inactive", "Enabled": false }, "MQConnectivity": { "Status": "Inactive", "Enabled": false }, "SNMP": { "Status": "Inactive", "Enabled": false } }
Back up var/messagesight/data and var/messagesight/store:
[admin@localhost ~]$ zip -r -P <password> messagesight-11042015-0933.zip /var/messagesight/data /var/messagesight/store adding: mnt/messagesight/data/ (stored 0%) adding: mnt/messagesight/data/config/ (stored 0%) adding: mnt/messagesight/data/config/accepted.json (stored 0%) adding: mnt/messagesight/data/config/server_docker.cfg (deflated 70%) adding: mnt/messagesight/data/config/store.init (stored 0%) adding: mnt/messagesight/data/config/testLicense.json (stored 0%) adding: mnt/messagesight/data/config/ILMT_PROD.def (stored 0%) adding: mnt/messagesight/data/config/ILMT_NONPROD.def (stored 0%) adding: mnt/messagesight/data/config/mqclient.ini (deflated 70%) adding: mnt/messagesight/data/config/server.cfg (deflated 70%) adding: mnt/messagesight/data/config/IBMIoTMessageSight.service (deflated 52%) adding: mnt/messagesight/data/config/vmprofile.cfg (deflated 53%) adding: mnt/messagesight/data/config/MessageSightInstance.inited (stored 0%) adding: mnt/messagesight/data/config/.serverCFGUpdated (stored 0%) adding: mnt/messagesight/data/config/server_dynamic.json.org (deflated 73%) adding: mnt/messagesight/data/config/server_dynamic.json.bak (deflated 73%) adding: mnt/messagesight/data/config/server_dynamic.json (deflated 73%) adding: mnt/messagesight/data/certificates/ (stored 0%) adding: mnt/messagesight/data/certificates/keystore/ (stored 0%) adding: mnt/messagesight/data/certificates/keystore/AdminDefaultKey.pem (deflated 21%) adding: mnt/messagesight/data/certificates/keystore/AdminDefaultCert.pem (deflated 34%) adding: mnt/messagesight/data/certificates/LDAP/ (stored 0%) adding: mnt/messagesight/data/certificates/MQC/ (stored 0%) adding: mnt/messagesight/data/certificates/truststore/ (stored 0%) adding: mnt/messagesight/data/certificates/LTPAKeyStore/ (stored 0%) adding: mnt/messagesight/data/certificates/OAuth/ (stored 0%) adding: mnt/messagesight/data/certificates/PSK/ (stored 0%) adding: mnt/messagesight/store/ (stored 0%) adding: mnt/messagesight/store/com.ibm.ism/ (stored 0%) adding: mnt/messagesight/store/com.ibm.ism/com.ibm.ism.0.store.lock (stored 0%) adding: mnt/messagesight/store/persist/ (stored 0%) adding: mnt/messagesight/store/persist/PState (deflated 32%) adding: mnt/messagesight/store/persist/CPM_0_1 (deflated 97%) adding: mnt/messagesight/store/persist/CPG_0_1 (deflated 98%) adding: mnt/messagesight/store/persist/ST_0_0 (deflated 100%) adding: mnt/messagesight/store/persist/ST_1_0 (deflated 100%) adding: mnt/messagesight/store/persist/ST_0_1 (deflated 100%) adding: mnt/messagesight/store/persist/ST_1_1 (deflated 100%) adding: mnt/messagesight/store/persist/CPM_0_0 (deflated 95%) adding: mnt/messagesight/store/persist/CPG_0_0 (deflated 98%)
Restart
the server in production mode:
[admin@localhost ~]$ curl -X POST \ > -H 'Content-Type: application/json' \ > -d '{ > "Service": "Server", > "Maintenance": "stop", > } > ' \ > http://127.0.0.1:9089/ima/v1/service/restart
Check that the server is running in production mode::
[admin@localhost ~]$ curl -k -H "Content-Type: application/json" -X GET https://127.0.0.1:9089/ima/v1/service/status "Version":"v1", "Server": { "Name": "TestSysem:9089", "UID": "aFWxYf32", "Status": "Running", "State": 1, "StateDescription": "Running (production)", "ServerTime": "2016-03-04T14:46:53.081Z", "UpTimeSeconds": 24, "UpTimeDescription": "0 days 0 hours 0 minutes 24 seconds", "Version": "2.0 20160304-0400", "ErrorCode": 0, "ErrorMessage": "" }, "Container": { "UUID":"034c91ce828a4f5c2c21d7cd7f04628368b63bd308825ec2d9dab5096ff04ca0" }, "HighAvailability": { "Status": "Inactive", "Enabled": false }, "Cluster": { "Status": "Inactive", "Enabled": false }, "Plugin": { "Status": "Inactive", "Enabled": false }, "MQConnectivity": { "Status": "Inactive", "Enabled": false }, "SNMP": { "Status": "Inactive", "Enabled": false } }