Hi, 

  

Your first error is a MySQL error. 

Or you can add a config option to your my.cnf which sets the max_allowed_packet 
to a high enough value (I guess the import goes as a single transaction, so try 
to use at least the size of your ungzipped dbback). A wild working guess would 
be 10G. 

Or you can hack the db_opsview script and insert the command line option 
--max-allowed-packet=XXG 

  

Second error is easy: there is already data in your new database. Empty it 
first, but you will likely hit error 1 again. 

  

Regards, 

-- 

Toni Van Remortel

System Engineer @ Precision Operations NV

+32 3 451 92 20 - [email protected]


  

From:[email protected] 
[mailto:[email protected]] On Behalf Of brooks. robert
Sent:Thursday, May 07, 2009 3:13 PM
To:[email protected]
Subject:[opsview-users] Issues importing database when moving between two 
platforms 



  

Hello, 

  

I am currently attempting to migrate from one Opsview platform to another and 
am having difficulty in migrating the data. 

  

As an added complication the source system in 2.14 and the destination system 
is 3.0.3 – I am however only interested in migrating the configuration data and 
the mrtg historical graphs.  Unless someone knows otherwise, I am going to 
assume that the errors I am seeing here are not related to the version 
mismatch. 

  

In particular I am trying to move the Opsview configuration by completing the 
following:- 

  

  

Procedure 1 followed and error seen:- 

  

On old server I completed the following: 

  

nag...@rbc-opsview:/usr/local/nagios/bin$ ./db_opsview db_backup | gzip -c > 
dbback.gz 

  

On new server after moving dbback.gz file: 

  

[nag...@lin-oppsview ~]$ cd /usr/local/nagios/bin 

[nag...@lin-oppsview bin]$ gunzip -c dbback.gz | db_opsview db_restore 

WARNING: This will delete any current data in opsview 

ERROR 1153 (08S01) at line 1470: Got a packet bigger than 'max_allowed_packet' 
bytes 

Cannot import 

  

  

Procedure 2 followed and error seen:- 

  

On old server I completed the following: 

  

RBC-OPSView:/usr/local/nagios/bin# ./db_opsview db_export > dbexport 

  

On new server after moving dbexport file: 

  

[nag...@lin-oppsview bin]$ db_opsview db_import < dbexport 

ERROR 1062 (23000) at line 61: Duplicate entry '1' for key 1 

egrep: writing output: Connection reset by peer 

Cannot import 

[nag...@lin-oppsview bin]$ 

  

  

Has anyone seen either of these errors and have a solution ? 

  

  

Regards, 

  

  

Robert 

  

  

  

  


This Electronic Mail (e-mail) contains confidential and privileged information 
intended only for the use of the individual or entity to which it is sent. If 
the reader of this message is not the intended recipient, or the employee or 
agent responsible for delivery to the intended recipient, you are hereby 
notified that any dissemination, distribution, or copying of this communication 
is STRICTLY PROHIBITED. If you have received this communication in error, 
please immediately notify the sender by reply e-mail or telephone.


_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/listinfo/opsview-users

Reply via email to