Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# Backup the SQL database
su - postgres -c "pg_dumpall > /opt/nistore/producers/noclook/sql/postgres.sql"
# Run NOCLook producer for backup purpose
cd /opt/norduni/src/scripts/
rm /opt/nistore/producers/noclook/json/*
./noclook_producer.py -O /opt/nistore/producers/noclook/json/
# Push the changes to nistore master
/usr/local/sbin/ni-push.sh -r /opt/nistore/

To restore the data from a backup use psql and noclook_consumer.py.

Code Block
titlerestore.conf
# All producers need to be listed here with a path data or empty
[data]
juniper_conf = 
nmap_services = 
alcatel_isis = 
noclook = /opt/nistore/producers/noclook/json/

...

Code Block
sudo -u postgres psql -f /opt/nistore/producers/noclook/sql/postgres.sql postgres
noclook_consumer.py -C restore.conf -I

...