Comware

 View Only
  • 1.  5500/5120 automatic config save and export

    Posted Feb 14, 2013 09:28 AM

    Hello, 

     

    I've got several 5500 EI and 5120 EI switches that I would like to backup automatically every day. The task is to export a version of the running config everyday at let's say 11pm to an external FTP or TFTP server

     

    Can someone tell me how to do it ? 

    I've found several commands, but none of them really useful: 

     

    1.

    archive configuration location /flash:/archive filename-prefix switch1

    archive configuration interval 1440

    archive configuration max 1

    The switch has a FTP server activated from which every evening, the external machine downloads the file. 

     

    This is how it's actually configured, but it doesn't work quite correctly. The problem is that a reboot of the switchs resets the 1440 minutes period timer(1 day) which is not good. 

     

    2. 

    There is also the command archive and schedule. I could schedule an archive of the configuration, but this can't be done periodically. i.e. you can't schedule an operation every day at xx:xx but only once.

     

    Any help would be appreciated.  


    #ftp


  • 2.  RE: 5500/5120 automatic config save and export

    Posted Feb 15, 2013 02:05 AM

    Two things, in terms of the timer and reboots, then you really need to run NTP to resolve this. And  secondaly, IMC can do automated backups,  so you will need to spend some money and purchase it. If you don't want IMC then you will have to start playing around with Freeware SNMP products and do some scripting


    #snmp
    #NTP


  • 3.  RE: 5500/5120 automatic config save and export

    Posted Feb 17, 2013 04:48 PM
    An alternative to using IMC is RANCID (http://www.shrubbery.net/rancid/) - there is a plugin for Comware-based switches at https://sites.google.com/site/jrbinks/code/rancid/h3c


  • 4.  RE: 5500/5120 automatic config save and export

    Posted Nov 02, 2022 03:31 AM
    Edited by basitnaseri8 Nov 03, 2022 09:18 AM
    Hi IMC cant take backup from Comware switch i try to backup from 5900 switch but it show  failed to excute script.


  • 5.  RE: 5500/5120 automatic config save and export

    Posted Feb 15, 2013 05:11 PM

    Hi,

     

    archive is only intended for additional local backup files.

     

    Job schedules are what you need:

    system-view

    job 1-save
     time 1 repeating at 12:00 command save safely force
     time 2 repeating at 12:01 command tftp x.x.x.x put startup.cfg sw1-startup.cfg

    You can add more jobs to get this done every hour,

     

    Best regards,Peter.



  • 6.  RE: 5500/5120 automatic config save and export

    Posted Feb 15, 2013 05:12 PM

    typo, should be:

     

    job 1-save
      view monitor
     time 1 repeating at 12:00 command save safely force
     time 2 repeating at 12:01 command tftp x.x.x.x put startup.cfg sw1-startup.cfg

     

     



  • 7.  RE: 5500/5120 automatic config save and export

    Posted Feb 17, 2013 01:54 AM

    Is there any possibility to dynamically add the date to the filename?

     

    e.g.

     time 2 repeating at 12:01 command tftp x.x.x.x put startup.cfg sw1-startup.cfg-MM-DD-YYYY

     



  • 8.  RE: 5500/5120 automatic config save and export

    Posted Feb 18, 2013 09:49 AM

    Hey, thanks to all of you for your replies, 

     

    @Peter, 

    I just scheduled a job as you explained and gonna check tomorrow to see if it worked. 

     

    Thanks a lot



  • 9.  RE: 5500/5120 automatic config save and export

    Posted Apr 04, 2014 06:12 AM

    For the people who are interested:
    When you use an A5900 with comware 7

    The commands are:

     

    scheduler job 1-save

    command 1 save safely force

     

    scheduler job 2-write

    command 1 tftp x.x.x.x put startup.cfg sw1-startup.cfg

     

    scheduler schedule save

    job 1-save

    time repeating at 12:00

     

    scheduler schedule write

    job 2-write

    time repeating at 12:01

     

     

     



  • 10.  RE: 5500/5120 automatic config save and export

    Posted Jun 18, 2014 09:06 AM

    HI

     

    I have to scheduled the configuration autobackup on H3C switches at every saturday at 22.00 hrs. Please share if it is possible & steps of configuration

     

    Regards,

    Harpreet Singh