zenoss/zenoss-prodbin — pull request #508 by wplu (2014-10-20 21:48:22+00:00)
Title: update xml and zodb.sql.gz from output of exportXml

DEMO:
```
https://intranet.zenoss.com/docs/DOC-5582

# plu@plu-9: git diff
diff --git a/services/Zenoss.core/MySQL/service.json b/services/Zenoss.core/MySQL/service.json
index 14ac634..9105e78 100644
--- a/services/Zenoss.core/MySQL/service.json
+++ b/services/Zenoss.core/MySQL/service.json
@@ -3,6 +3,18 @@
"Command": "/usr/bin/mysqld_safe",
"Endpoints": [
{
+ "Name": "redis",
+ "Application": "redis",
+ "PortNumber": 6379,
+ "Protocol": "tcp",
+ "Purpose": "import"
+ },
+ {
+ "Name": "rabbitmq",
+ "Application": "rabbitmq.*",
+ "Purpose": "import"
+ },
+ {
"Name": "mysql",
"Application": "zodb_mysql",
"PortNumber": 3306,
~/src/europa/build/services/Zenoss.core
# plu@plu-9: serviced service start /redis
Service scheduled to start.
~/src/europa/build/services/Zenoss.core
# plu@plu-9: serviced service start rabbitmq
Service scheduled to start.
~/src/europa/build/services/Zenoss.core
# plu@plu-9: serviced service start mysql
Service scheduled to start.
~/src/europa/build/services/Zenoss.core
# plu@plu-9: serviced service attach mysql
bash-4.2# su - zenoss
(zenoss)[zenoss@1c1d56e42cf2 ~]$ scp plu@plu-9:svnint/branches/core/zenoss-4.x/inst/zenwipe.sh .
The authenticity of host 'plu-9 (10.87.110.39)' can't be established.
ECDSA key fingerprint is 90:76:02:9d:4e:21:c7:15:4a:f9:87:1b:4b:fe:bb:72.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'plu-9,10.87.110.39' (ECDSA) to the list of known hosts.
plu@plu-9's password:
zenwipe.sh 100% 2644 2.6KB/s 00:00
(zenoss)[zenoss@1c1d56e42cf2 ~]$ ./zenwipe.sh --xml
Dropping database: zodb
Creating database: zodb
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Dropping database: zodb_session
Creating database: zodb_session
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Dropping database: zenoss_zep
Creating database: zenoss_zep
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Applying schema version: 4
Applying schema version: 5
Applying schema version: 6
Deleting Zenpacks
/opt/zenoss/lib/python2.7/site-packages/relstorage/adapters/scriptrunner.py:52: Warning: Table 'connection_info' already exists
cursor.execute(stmt, generic_params)
ZentinelPortal loaded at zport
2014-10-20 21:27:23,376 INFO zen.XmlDataLoader: loading data from:/opt/zenoss/Products/ZenModel/data
2014-10-20 21:27:23,376 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/devices.xml
2014-10-20 21:27:27,909 INFO zen.XmlDataLoader: Calling reIndex /zport/dmd/Devices
2014-10-20 21:27:27,912 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:27:27,912 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:27:29,305 INFO zen.XmlDataLoader: Loaded 492 objects into the ZODB database
2014-10-20 21:27:29,305 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/events.xml
2014-10-20 21:27:32,801 INFO zen.XmlDataLoader: Calling reIndex /zport/dmd/Events
2014-10-20 21:27:32,867 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:27:32,868 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:27:34,162 INFO zen.XmlDataLoader: Loaded 468 objects into the ZODB database
2014-10-20 21:27:34,163 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/manufacturers.xml
2014-10-20 21:28:03,412 INFO zen.XmlDataLoader: Calling reIndex /zport/dmd
2014-10-20 21:28:05,895 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:28:05,895 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:28:15,077 INFO zen.XmlDataLoader: Loaded 3252 objects into the ZODB database
2014-10-20 21:28:15,077 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/menus.xml
2014-10-20 21:28:16,780 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:28:16,781 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:28:17,506 INFO zen.XmlDataLoader: Loaded 225 objects into the ZODB database
2014-10-20 21:28:17,506 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/monitorTemplate.xml
2014-10-20 21:28:19,057 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:28:19,057 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:28:19,512 INFO zen.XmlDataLoader: Loaded 103 objects into the ZODB database
2014-10-20 21:28:19,513 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/osprocesses.xml
2014-10-20 21:28:19,698 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:28:19,699 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:28:19,829 INFO zen.XmlDataLoader: Loaded 19 objects into the ZODB database
2014-10-20 21:28:19,829 INFO zen.XmlDataLoader: loading: /opt/zenoss/Products/ZenModel/data/services.xml
2014-10-20 21:28:57,229 INFO zen.XmlDataLoader: Calling reIndex /zport/dmd/Services
2014-10-20 21:28:58,622 INFO zen.XmlDataLoader: End loading objects
2014-10-20 21:28:58,623 INFO zen.XmlDataLoader: Processing links
2014-10-20 21:29:09,764 INFO zen.XmlDataLoader: Loaded 3869 objects into the ZODB database
2014-10-20 21:29:18,082 INFO zen.ReportLoader: Loading reports from /opt/zenoss/Products/ZenReports/reports
2014-10-20 21:29:18,213 INFO zen.ReportLoader: loading: /Performance Reports/Threshold Summary
2014-10-20 21:29:18,256 INFO zen.ReportLoader: loading: /Performance Reports/CPU Utilization
2014-10-20 21:29:18,289 INFO zen.ReportLoader: loading: /Performance Reports/Interface Utilization
2014-10-20 21:29:18,328 INFO zen.ReportLoader: loading: /Performance Reports/Availability Report
2014-10-20 21:29:18,372 INFO zen.ReportLoader: loading: /Performance Reports/Aggregate Reports
2014-10-20 21:29:18,385 INFO zen.ReportLoader: loading: /Performance Reports/Memory Utilization
2014-10-20 21:29:18,420 INFO zen.ReportLoader: loading: /Performance Reports/Filesystem Util Report
2014-10-20 21:29:18,453 INFO zen.ReportLoader: loading: /Device Reports/All Devices
2014-10-20 21:29:18,463 INFO zen.ReportLoader: loading: /Device Reports/Software Inventory
2014-10-20 21:29:18,480 INFO zen.ReportLoader: loading: /Device Reports/Model Collection Age
2014-10-20 21:29:18,502 INFO zen.ReportLoader: loading: /Device Reports/SNMP Status Issues
2014-10-20 21:29:18,512 INFO zen.ReportLoader: loading: /Device Reports/Device Changes
2014-10-20 21:29:18,534 INFO zen.ReportLoader: loading: /Device Reports/All Monitored Components
2014-10-20 21:29:18,551 INFO zen.ReportLoader: loading: /Device Reports/MAC Addresses
2014-10-20 21:29:18,569 INFO zen.ReportLoader: loading: /Device Reports/New Devices
2014-10-20 21:29:18,591 INFO zen.ReportLoader: loading: /Device Reports/Ping Status Issues
2014-10-20 21:29:18,604 INFO zen.ReportLoader: loading: /Event Reports/All Heartbeats
2014-10-20 21:29:18,617 INFO zen.ReportLoader: loading: /Event Reports/All EventMappings
2014-10-20 21:29:18,633 INFO zen.ReportLoader: loading: /Event Reports/All EventClasses
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
In [1]:
In [2]:
In [3]:
Do you really want to exit ([y]/n)?

(zenoss)[zenoss@1c1d56e42cf2 ~]$ ls -ltr
total 4
-rwxrwxr-x 1 zenoss zenoss 2644 Oct 20 21:27 zenwipe.sh
(zenoss)[zenoss@1c1d56e42cf2 ~]$ /opt/zenoss/Products/ZenModel/data/exportXml.sh
Loading reports...
2014-10-20 21:29:47,849 INFO zen.ReportLoader: Loading reports from /opt/zenoss/Products/ZenReports/reports
2014-10-20 21:29:47,959 INFO zen.ReportLoader: loading: /Performance Reports/Threshold Summary
2014-10-20 21:29:48,027 INFO zen.ReportLoader: loading: /Performance Reports/CPU Utilization
2014-10-20 21:29:48,063 INFO zen.ReportLoader: loading: /Performance Reports/Interface Utilization
2014-10-20 21:29:48,105 INFO zen.ReportLoader: loading: /Performance Reports/Availability Report
2014-10-20 21:29:48,151 INFO zen.ReportLoader: loading: /Performance Reports/Aggregate Reports
2014-10-20 21:29:48,169 INFO zen.ReportLoader: loading: /Performance Reports/Memory Utilization
2014-10-20 21:29:48,207 INFO zen.ReportLoader: loading: /Performance Reports/Filesystem Util Report
2014-10-20 21:29:48,244 INFO zen.ReportLoader: loading: /Device Reports/All Devices
2014-10-20 21:29:48,256 INFO zen.ReportLoader: loading: /Device Reports/Software Inventory
2014-10-20 21:29:48,275 INFO zen.ReportLoader: loading: /Device Reports/Model Collection Age
2014-10-20 21:29:48,300 INFO zen.ReportLoader: loading: /Device Reports/SNMP Status Issues
2014-10-20 21:29:48,313 INFO zen.ReportLoader: loading: /Device Reports/Device Changes
2014-10-20 21:29:48,336 INFO zen.ReportLoader: loading: /Device Reports/All Monitored Components
2014-10-20 21:29:48,357 INFO zen.ReportLoader: loading: /Device Reports/MAC Addresses
2014-10-20 21:29:48,377 INFO zen.ReportLoader: loading: /Device Reports/New Devices
2014-10-20 21:29:48,402 INFO zen.ReportLoader: loading: /Device Reports/Ping Status Issues
2014-10-20 21:29:48,417 INFO zen.ReportLoader: loading: /Event Reports/All Heartbeats
2014-10-20 21:29:48,435 INFO zen.ReportLoader: loading: /Event Reports/All EventMappings
2014-10-20 21:29:48,455 INFO zen.ReportLoader: loading: /Event Reports/All EventClasses
0
Running migrate...
INFO:zen.migrate:Installing EuropaRemoveZenPackCreateDelete (4.9.70)
INFO:zen.migrate:Installing EventsAppZenoss (4.9.70)
INFO:zen.migrate:Installing FlappingSeverityType (4.9.70)
INFO:zen.migrate:Installing MacAddressIndex (4.9.70)
Reindexing. This may take some time...

INFO:zen.migrate:Finished total time=0.27 rate=0.00 count=0
INFO:zen.migrate:Installing MaintenanceWindowHooks (4.9.70)
INFO:zen.migrate:Installing RemoveIgnoreParametersFromOsProcessClass (4.9.70)
INFO:zen.migrate:Removing ignoreParameters and ignoreParametersWhenModeling from all OSProcessClass objects
INFO:zen.migrate:Installing RemoveRenderServer (4.9.70)
INFO:zen.migrate:Installing UpdateDeviceClassCredentials (4.9.70)
INFO:zen.migrate:Installing UpdateLocalhostTemplate (4.9.70)
INFO:zen.migrate:Installing ZCollectorDecoding (4.9.70)
INFO:zen.migrate:Installing addzSnmpContext (4.9.70)
INFO:zen.migrate:Loading Reports
Dumping Menus...
Dumping Devices...
Dumping Services...
Dumping Event Classes...
Dumping Manufacturers...
Dumping Collector Templates...
Dumping Zenoss OS Process definitions...
Dumping SQL...
(zenoss)[zenoss@1c1d56e42cf2 ~]$ ls -ltr
total 8404
-rwxrwxr-x 1 zenoss zenoss 2644 Oct 20 21:27 zenwipe.sh
-rw-rw-r-- 1 zenoss zenoss 145943 Oct 20 21:29 menus.xml
-rw-rw-r-- 1 zenoss zenoss 346516 Oct 20 21:30 devices.xml
-rw-rw-r-- 1 zenoss zenoss 1806576 Oct 20 21:30 services.xml
-rw-rw-r-- 1 zenoss zenoss 197565 Oct 20 21:30 events.xml
-rw-rw-r-- 1 zenoss zenoss 1197532 Oct 20 21:30 manufacturers.xml
-rw-rw-r-- 1 zenoss zenoss 98664 Oct 20 21:30 monitorTemplate.xml
-rw-rw-r-- 1 zenoss zenoss 16081 Oct 20 21:30 osprocesses.xml
-rw-rw-r-- 1 zenoss zenoss 4774285 Oct 20 21:30 zodb.sql.gz
(zenoss)[zenoss@1c1d56e42cf2 ~]$ rsync --delete -a *xml *gz plu@plu-9:tmp/exportXml/
plu@plu-9's password:
(zenoss)[zenoss@1c1d56e42cf2 ~]$

```

![screen shot 2014-10-20 at 16 47 14](https://cloud.githubusercontent.com/assets/2837923/4709821/c5f2d414-58a2-11e4-8a27-24ef33fd7694.png)