Intrusion Prevention

Expand all | Collapse all

How to save NSM Configuration

  • 1.  How to save NSM Configuration

    Posted 12-11-2007 01:29
    Hi Guys,

    Can we save NSM config include all policy,role,and address object into local desktop??
    so if necessary we can restore it from export file.

    thnks

    =ND=


  • 2.  RE: How to save NSM Configuration

    Posted 12-14-2007 02:13
    Hi ND,
    sure you can.
    Go in:
    /usr/netscreen/HaSvr/utils
    and run:
    ./replicateDb backup

    This will create a backup under the directory:
    /var/netscreen/dbbackup/backup
    where is the number of the day (0 Monday, 6 Sunday).

    To be sure that the backup is complete, check the file:
    /var/netscreen/dbbackup/backup/CompleteToken
    This file has to be present and the date/time of the file has to be correct (ie. not from an old backup)

    Hope this helps

    Cheers!
    --
    Daniele


  • 3.  RE: How to save NSM Configuration

    Posted 12-14-2007 08:04
    so how to restore the backup config?? we can't do in NSM application right?


  • 4.  RE: How to save NSM Configuration

    Posted 01-24-2008 12:35
    Hi NDCool,

    No you can't do it via NSM GUI. Therefore there is a way to do it in cli :

    Navigate in /usr/netscreen/HaSvr/utils and do a :
    sh restoreDbFromBackup.sh BACKUP_DIRECTORY

    In your case BACKUP_DIRECTORY should be :
    /var/netscreen/dbbackup/backup1
    or
    /var/netscreen/dbbackup/backup2
    or
    /var/netscreen/dbbackup/backup ...

    I ve done restores several time and never got an issue with this.

    Sylvain


  • 5.  RE: How to save NSM Configuration

    Posted 02-12-2008 02:04
    Hi Silvain,

    Thanks for ur attention,
    I has trying to backup using this command :

    tar cvf /var/netscreen/GuiSvr.backup.tar /var/netscreen/GuiSvr

    tar cvf /var/netscreen/DevSvr.backup.tar /var/netscreen/DevSvr

    and i think this is only copy and backup the guiserver/devserver folder. Then i restored it on new server and done.
    All config and update attack included. But it's takes big space of storage.
    How bout with this command "./replicateDb backup", does backup all config or the databases only??


    rgds,
    -ND-


  • 6.  RE: How to save NSM Configuration
    Best Answer

    Posted 02-19-2008 02:11
    Hi ND,

    You are not suppose to save /var/netscreen/GuiSvr & /var/netscreen/GuiSvr because NSM automaticaly do a clean backup in /var/netscreen/dbbackup/backup(day of the week)
    With your method, it take a big place because your archive contains devices s ( FW and IDP ) logs ( /var/netscreen/devSvr/logs ). By default, NSM backup does not include device logs, that s why  it s smaller.

    So as you said you can do your own backup via "replicateDb backup" or just do a "tar cvf /var/netscreen/dbbackup/backup(d of week"). These 2 way are similar and give you a package with config and database.

    regards,

    Sylvain


  • 7.  RE: How to save NSM Configuration

    Posted 02-19-2008 23:45
    Hi Sylvain, thanks for ur explain.
    I will tested on my lab.

    after i try,the backup take more than 400MB
    btw, thanks to help.


    thanks
    -ND-
    Message Edited by NDCool on 02-22-2008 10:15 AM


  • 8.  RE: How to save NSM Configuration

    Posted 02-28-2008 02:58

    can i just check...

    Can i just copy the latest backup file automatically created by NSM eg /var/netscreen/dbbackup/backup1 from NSM to other media ( eg usb disc ) and this will be enough to use as a restore of the config of NSM in event of a total server lost.



  • 9.  RE: How to save NSM Configuration

    Posted 07-24-2009 08:50

    You all may find this handy, this automates and kicks off backups via FTP.

     

    I usually place it in /usr/local/bin, set permissions to 775, owner to nsm, and group to nsm.

    Bear in mind this code is for an NSMExpress, your installation may differ. 

    This is setup for a daily backup, so in your HaSvr.cfg set highAvail.numOfBackups to 7

    This will pick the backup folder for that day of the week, compress it, and name it based on the datestamp.

    After it's done with that, it will FTP it to the server you specify.

    When complete, it will cleanup after itself. i.e. the archive it just created.

    If you want to start this from cron, you need to su to the nsm user, and edit your crontab.

    sudo su - nsm
    crontab -e

    to run every night at midnight, add the following line:

    00 23 * * * root /usr/local/bin/nsm_backup.pl



  • 10.  RE: How to save NSM Configuration

    Posted 02-28-2008 14:02
    Hi piewacket

    Yes it will be enought.

    Just for your information, backup1 is not the last one. The NSM backup process create one backup a day every day of the week.
    Do a ls -la in order to know the last one.

    Regards,

    Sylvain


  • 11.  RE: How to save NSM Configuration

    Posted 02-29-2008 02:32

    many thanks - have created an an archive file of latest backup and copied off to a usb stick

     


    #Ripon