Howto restore your system

From Netmon

Jump to: navigation, search

If your netmon unit becomes totally unusable, either from an operating system corruption or other extreme circumstances, you can use this guide to backup your database, reinstall the Debian Linux operating system and Netmon, and restore your old database and settings.

WARNING: Following these instructions could potentially destroy your Netmon database and Debian operating system. Only follow these instructions when recommended by Netmon technical support.

Contents

Requirements

  • An SMB share (Windows shared folder) accessible from your Netmon device which has enough diskspace to store Netmon's database files
  • A debian live CD or USB Key
  • A DHCP enabled network with internet access

Step 1 (Boot from CD and mount SMB Share)

  • Boot from the USB key or CD. The system will find an IP address using DHCP.
  • Once you arrive at the command prompt, run
sudo passwd

Enter a new root password that will be used for this session. 'netmon' will suffice.

  • Now run
su
mkdir /mnt/var
mount -t xfs /dev/sda2 /mnt/var

*Note* if your hard drive uses IDE instead of SATA, the last command will instead be

mount -t xfs /dev/hdc2 /mnt/var
  • A few extra packages are required, these commands will download and install them. Simply press enter to any questions these commands may ask.
apt-get update
apt-get install smbfs bzip2
  • Now we must mount the smb share. Assuming the Windows domain username is jack, the password is jack1, the share name is myfolder, the shared folder resides on the server 192.168.1.20 and the Windows domain name is bigcorp, we will run the commands
mkdir /mnt/smb
mount -t smbfs -o lfs,username=jack,password=jack1,workgroup=bigcorp //192.168.1.20/myfolder /mnt/smb

Step 2 (Copying the database files over to the SMB share)

  • To copy the files to the SMB share, run
mkdir /mnt/smb/netmon_data
cd /mnt/var/lib/postgresql/8.1
tar cjvf /mnt/smb/netmon_data/database.tbz2 main 

Step 3 (Re-installing Netmon)

  • Run the command restart from the previous prompt and boot from the Netmon Installation CD
  • The instructions on screen will follow you through the automated installation. If you require more help, follow these instructions for installing Netmon from CD.
  • After installation, the Netmon device will boot into a graphical login screen. Login with netmon/netmon. Run the 'terminal' icon found on the desktop. Run the following commands in this terminal
su
apt-get install smbfs bzip2
mkdir /mnt/smb
mount -t smbfs -o lfs,username=jack,password=jack1,workgroup=bigcorp //192.168.1.20/myfolder /mnt/smb
cd /var/lib/postgresql/8.1
/etc/init.d/netmon stop
/etc/init.d/postgresql-8.1 stop
rm -r main
tar xjvf /mnt/smb/netmon_data/database.tbz2
chown -R postgres.postgres main
/etc/init.d/postgresql-8.1 restart
/etc/init.d/netmon restart

Your database should now be restored and your Netmon device should be functional again.

Personal tools