Discussion:
export/import devices from version 3 to version 4
dbman
2012-08-16 18:02:06 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67892#67892

--------------------------------------------------------------
I need to export devices from zenoss 3.1 and import them into zenoss 4.2.  I see differences in commands and Im trying to figure out the right export command for 3.1 that can be used as valid input file for import command in zenoss 4.2.

3.1                           4.2
=============     =======
zendevicedump         zenbatchload?

help!!!!
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67892#67892]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-08-16 18:15:30 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67910#67910

--------------------------------------------------------------
You can't restore a backup from one version of Zenoss on another version. If you just want to copy over the names of the devices with no other details, you can probably get a list of their names via zendmd and use zenbatch load to load them.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67910#67910]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-16 18:20:02 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67893#67893

--------------------------------------------------------------
wow thanks for the freaking fastest reply I ever got! :)

since zope stores stuff in mysql now, being a db guy, im thinking about using sql string manipulation to to export stuff via SQL.  Then I can custom it whatever way I like to make it conform to future import command structure.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67893#67893]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-08-16 18:27:04 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67911#67911

--------------------------------------------------------------
Zope doesn't really store stuff in MySQL - it's still Zope, but uses relstorage - in v4 only. I don't know that MySQL can even see the actual data... Unless they changed something between betas and release...

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67911#67911]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-16 19:01:18 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67894#67894

--------------------------------------------------------------
rats, ur right, nothing but numbers and binaryblob data in zope mysql tables :((
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67894#67894]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2012-08-17 02:13:04 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67922#67922

--------------------------------------------------------------
Going back James' comment are you simply looking for the device names, or are you also trying to cary over other attributes about the devices?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67922#67922]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-17 11:08:39 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67935#67935

--------------------------------------------------------------
device names and classes they belong to for sure, not trying to bring over other stuff associated with them, like templates, RRds, etc.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67935#67935]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
alex0cy
2012-08-17 14:16:36 UTC
Permalink
alex0cy [http://community.zenoss.org/people/alex0cy] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67937#67937

--------------------------------------------------------------
I believe you still can use zenbatchdump to dump devices from 3.1 and then zenbatchrestore to load dump to 4.2
The script seems to appear only in 4.2 so you have to copy /opt/zenoss/bin/zenbatchdump to your 3.1 zenoss
I tried this on 3.2.1 and it works just fine.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67937#67937]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-17 14:30:20 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67938#67938

--------------------------------------------------------------
ahhh, thanks for the tip, I will try it too, although Im at 3.1, not 3.2.  So you think its just a matter of bringing over the zenbatchdump py file to zenoss 3.1 and run the bad boy?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67938#67938]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-17 14:48:05 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67939#67939

--------------------------------------------------------------
not that easy to bring over zenbatchdump from 4.2 to 3.1.

Had to also bring over ZenDeviceDumper.py as well and still got errors:

Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenModel/BatchDeviceDumper.py", line 425, in <module>
    batchDumper.run()
  File "/opt/zenoss/Products/ZenModel/BatchDeviceDumper.py", line 400, in run
    foundLSGO['Locations'] = self.listLSGOTree(outFile, self.dmd.Locations)
  File "/opt/zenoss/Products/ZenModel/BatchDeviceDumper.py", line 276, in listLSGOTree
    (name, props) = self._emitOrg(branch)
  File "/opt/zenoss/Products/ZenModel/BatchDeviceDumper.py", line 211, in _emitOrg
    props = [] if isinstance(org, DeviceClass) and 'ZenPacks' in org.zPythonClass else self._emitProps(org)
  File "/opt/zenoss/Products/ZenModel/BatchDeviceDumper.py", line 131, in _emitProps
    for prop in ((x['id'], repr(x['value'])) for x in obj.exportZProperties() if x['islocal']):
AttributeError: exportZProperties
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67939#67939]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
alex0cy
2012-08-17 14:58:03 UTC
Permalink
alex0cy [http://community.zenoss.org/people/alex0cy] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67940#67940

--------------------------------------------------------------
Hmm... Not sure if this will help, but zenbutchdump must be in $ZENHOME/bin and ZenDeviceDumper.py in $ZENHOME/Products/ZenModel/

If this will not help then you can upgrade your zenoss instance to 3.2.1 before doing this
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67940#67940]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dbman
2012-08-17 15:12:40 UTC
Permalink
dbman [http://community.zenoss.org/people/dbman] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67942#67942

--------------------------------------------------------------
yep I did put them in those respective directories before trying to run it.  Is it a big deal upgrading from 3.1 to 3.2.1?  Is there a short wiki on the commands to do it?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67942#67942]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-08-18 05:45:32 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/67959#67959

--------------------------------------------------------------
dbman:

I would duplicate your v3 instance, upgrade it to zenoss v4.2 in the staging environment then dump the devices with zedevicedump. Next setup a second staging environment with a fresh copy of v4.2. Use zendeviceload to load the dump. This is the best way to do what you need.

Here's a short doc on upgrading from v3 to v4. http://community.zenoss.org/docs/DOC-13022 http://community.zenoss.org/docs/DOC-13022

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67959#67959]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Johnathan Bravo
2013-01-07 18:27:59 UTC
Permalink
Johnathan Bravo [http://community.zenoss.org/people/MRJB] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/70827#70827

--------------------------------------------------------------
I know this is a bit of a dated thread. but I'm going from 3.2 to 4.3 and just trying to bring over devices , not data assocaited . and zendeviceload/zendevicedump don't exist in 4.3 .

any assistance would be appreciated.

MrJohnBravo
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70827#70827]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Richard Ferrell
2013-01-09 23:53:45 UTC
Permalink
Richard Ferrell [http://community.zenoss.org/people/g0mi] created the discussion

"Re: export/import devices from version 3 to version 4"

To view the discussion, visit: http://community.zenoss.org/message/70907#70907

--------------------------------------------------------------
I seem to be in the same boat. I have a production 3.1 instance and want to migrate all my devices to my 4.2 instance. I have done the same , bringing zenbatchdump and ZenDeviceDumper.py over to my 3.1 box. I am getting the same errors you are.

Not really adding much to the resolution , but letting you know that you are not alone in this endeavour.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70907#70907]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...