Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Issue with restoring backup.nems

#1
I've been messing around with NEMS the past few days and I ran into an issue with restoring a backup.nems file.

I have an SD card that I am using that is questionable. I decided that I would back everything up and then restore it to a fresh card.

I've done the back up twice and ran into an issue that seems strange to me. 

I get the following messages when I try to restore;

Code:
Backup file is from NEMS 1.4.1. Proceeding.
Source: /tmp/nems_migrator_restore/etc/nems/conf
PHP Parse error:  syntax error, unexpected end of file in /root/nems/nems-migrator/data/reconcile-nagios.sh on line 142
Creating a clean NEMS NConf configuration... Using v1.4 defaults... Done.
Importing Nagios Configs to NEMS NConf...
Importing: timeperiod
Importing: misccommand
Importing: checkcommand
Importing: contact
Importing: contactgroup
Importing: host-template
Importing: host
Importing: hostgroup
Importing: host-dependency
Importing: service-template
Importing: service
Importing: advanced-service
[ERROR] Could not read from /tmp/reconcile-advanced-services.cfg. Aborting.
rm: cannot remove '/tmp/reconcile-advanced-services.cfg': No such file or directory
Importing: servicegroup
Importing: service-dependency
Done.
Connecting default monitor to NEMS... Done.
Activating default host presets...  Done.
reconcile-resource...
 Importing: $USER1$=/usr/local/nagios/libexec
 Importing: $USER2$=/usr/share/nagios3/plugins/eventhandlers
 Importing: $USER3$=SECRET
 Importing: $USER4$=SECRET
 Importing: $USER5$[email protected]
 Importing: $USER6$=NULL
 Importing: $USER7$=smtp.gmail.com:587
 Importing: $USER8$=NULL
 Importing: $USER9$[email protected]
 Importing: $USER10$=SECRET
 Importing: $USER11$=NULL
 Importing: $USER12$=NULL
 Importing: $USER13$=NULL
 Importing: $USER14$=NULL
 Importing: $USER15$=1
Consolidation complete.

I hope everything worked okay for you.
Please let me know if you had any trouble.

PS - I saved a backup for you of the old config. /root/backup.nems
... just in case


I've changed $USER3$,4$,8$,9$, and 10$ because it has some privileged info there.

The things that popped out at me was the PHP parse error at the beginning and could not read from /tmp/reconcile-advanced-services.cfg.

When I do open up NConf, all of the hosts and advanced services are gone. It's like it really cleaned everything out when it ran the restore.

I didn't know if I was doing something wrong when I backued up the config or if there is truly a bug here.
 Reply
#2
Hmm, it looks like the reconciler crapped out on you. I'm investigating this for you now. Hang tight.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#3
The issue should be fixed now.
1) Run as root: nems-update
2) Run your nems-restore command as before

If any new error messages appear, please let me know and I will tackle them as well.

This bug came about as I migrated NEMS Migrator over to the new NEMS 1.5 (coming soon) and accidentally broke compatibility in 1.4.1. Sorry for the error! :)

Your backup will be fine; this bug only affected the ability to restore the reconciled data.

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#4
Robbie,

I did come back into work this evening and test this on my bad SD card. I burned it from scratch, and then did the nems-init.

Once I did that, I pulled the backup.nems from a flash drive and it did restore it seemed with no issues.

Thanks for your help on this! Hopefully this will work for our school district here in Ohio for our district network.

Thanks,
Matt
 Reply
#5
Thanks for the update Matt. If there is anything I can do to help, just let me know. I would truly be honored to have NEMS in use in your school district. If it goes well, let's chat about a case study.

Email me when you have time?

Side note: NEMS 1.5 is introducing NEMS Cloud, which allows you to monitor several sites from a single dashboard (like NEMS TV Dashboard; a single screen to see an overview). NEMS 1.5 also tells you in its notifications which site is reporting. So these features could really help with multi-school deployments. I'd be pleased to have a real-world use case to refer to.

Thanks!
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
#6
Robbie,

For sure we can talk more. I get a better chance this week, I'll send you more info about what we do and were we see us using NEMS in our environment. 

Right now, I'm using my own personal Raspberry Pi's to do this, but the hope is to ramp this up in the next few weeks with a permanent device.

Matt
 Reply
#7
Very nice, Matt.
Keep in mind, NEMS 1.5 is right around the corner (looking like a December release).

Looking forward to learning more, and having NEMS be a part of your IT infrastructure! It's an honor!

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 Reply
 
 
Forum Jump:

Users browsing this thread: 1 Guest(s)