Wireless Access

last person joined: yesterday 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Backup best practices

This thread has been viewed 8 times
  • 1.  Backup best practices

    Posted Jun 11, 2012 10:23 AM

    Hi!

     

    We have a fairly large Aruba environment and are trying to get a good backup flow going from all our controllers, Airwave and Amigopod. We are using Kiwi Cat tools to extract flashbackups, config etc from all controllers and it works nicely.

     

    Is anyone doing this with Airwave? We are trying to do the exact same thing to Airwave but we are having some problems with the password prompt generated by the SCP copy. How does your script for extracting backups out of the Airwave machine look like?

     

    The Amigopod does this by itself, but it names the file to date and time. This might be useful but since we are using scripts to manage the files on the server it lands on we want it to place it with the same name every time. Is this possible?

     

    Is anyone using something else to handle all the backups?

     

     



  • 2.  RE: Backup best practices

    Posted Jun 25, 2012 06:43 AM

    The reason why Kiwi cat tools doesn't do this for us is because of some follow up questions it gets that Kiwi can't answer. Is there a switch to the command that stops it from asking questions so Kiwi can get through with it? How are you guys backing up your Airwave?

     

     



  • 3.  RE: Backup best practices

    Posted Aug 07, 2012 03:07 PM

    RANCID is also a good solution for backing up configs, but not files.  I am interested in this question as well.

     

    ******BUMP



  • 4.  RE: Backup best practices
    Best Answer

    Posted Aug 07, 2012 04:13 PM

    We just use this line in a script:

    scp root@air.wave.ip.address:/var/airwave-backup/nightly_data001.tar.gz .

     

    I've pre-shared a certificate for root@airwave on my backup-box so this runs without password prompt.

     

    --Matthew



  • 5.  RE: Backup best practices

    Posted Aug 09, 2012 09:11 PM

    using the pre-shared certificate for you backup box, how did you install it on the backup box and the airwave server?



  • 6.  RE: Backup best practices

    Posted Aug 10, 2012 03:40 PM

    There are numerous tutorials on the web for this, and the specifics will depend on your clinet machine.

    I'm running Ubuntu Linux and Airwave is running CentOS of course.

     

    there's a good writeup for linux to linux here:

    http://blog.firedaemon.com/2011/07/27/passwordless-root-ssh-public-key-authentication-on-centos-6/

     

    and Mac to linux here:

    http://shapeshed.com/using_shared_keys_with_ssh_on_centos_5/

     

    --Matthew



  • 7.  RE: Backup best practices

    Posted Aug 21, 2012 05:38 AM

    Hi,

    I use a script running under a specific user on my Airwave server that pushes the "nightly_*.gz" files on a centralized server (witch is itself backup but an automate).

     

    The script is run by a CRON under the specific user on the Airwave server.

    You need to create an other CRON under the root user that gives to you specific user the rights on the "/var/airvawe-backup/" directory and sub files. (cause the Airwave backup script change rights of this directory to root only !)

     

    Warning, the root user crontab is overwritten during upgrade  !!   :robotfrustrated:



  • 8.  RE: Backup best practices

    Posted Aug 22, 2012 03:48 PM

    We are backing up tons of Aruba controllers using some custom scripts that log in and perform the flashbackup and scp it out of the controller.

     

    We have now moved over to the Solarwinds backup solution for Aruba. Currently it cannot do the same for Airwave (they are working on it) but Solarwinds even accepts a script so that you can download the flashbackup.

     

     



  • 9.  RE: Backup best practices

    Posted Apr 08, 2013 12:38 PM

    I have read and learned a lot about backing up files using the backup command.  I was wondering if anyone did the same work with automation for the restoration of files with the restore command?  I know the thread is kind of old, but the need is great. 

     

    For example can you cookie cutter the files?  Can you open the backup to remove and/or add files before bundling it all back up?  Writing a scipt to do just that would be easy.   First time keys, csr's, configuration files, identity and ca certs could be placed in the file in preperation for deployement and not needed files removed. 



  • 10.  RE: Backup best practices

    EMPLOYEE
    Posted Apr 08, 2013 06:00 PM

    The issue there is that the backup/restore scripts are tested for specific files.  So although you add files to the backup manually, it'd happen for that one backup which might get aged out over time (backups rotate, by default there are 4 backups maintained on server).  If you've got additional need to put other items into the backup, please let us know by filing it into the Ideas Portal on the support site.



  • 11.  RE: Backup best practices

    Posted Apr 15, 2014 03:43 PM

    Hello I am trying to get my flashbackup off with Solarwinds as well.  I was wondering if you can tell me what your doing and how you are accomplishing the tftp .. we go to a folder path but it seems that my controller will only take an IP to tftp to but not a path ie tftp: 10.0.0.0/aruba/backups



  • 12.  RE: Backup best practices

    Posted Aug 29, 2013 12:49 PM

    How to Backup the AP Controllers Nightly

     

    This document will show you how to back up the Aruba Wireless AP Controllers nightly for both the flash and running-config

     

    Begin by downloading the needed applications for this setup. Go to http://www.bitvise.com/download-area and download the bitvise tunnelier client software. Also, go to http://www.solarwinds.com/products/freetools/free_tftp_server.aspx and download the tftp server software.

     

    Install both of these software applications on the server that you are going to be taking backups from. This would be the file server where the backups will be stored. You may already have a tftp client installed and running on the server. In this case, disregard the installation of the tftp server. Verify that you have a TFTP-Root folder on your C:\ drive. This is where the tftp program will tftp the files to.

     

    If you navigate to the C:\Program Files (x86)\Bitvise SSH Client folder, you should now see a file called stermc.exe.

     

    Go to the Start>Search programs and files box and type in “sysdm.cpl” and hit enter.

     

    Go to the “Advanced” tab and click on the “Environment Variables” button

     

    Click the new button under System Variables and type in “stermc” for variable name and “C:\Program Files (x86)\Bitvise SSH Client\stermc.exe” as the Variable value. Click “OK” and “OK” and “OK” to exit.

     

    Open the BitVise client by going to Start>Programs>BitVise SSH Client>BitVise SSH Client

     

    Set up the SSH Client to connect to your AP Controller. Click the Login button. The first time you connect, the client will pop-up a message that asks you if you want to save the 2048 bit SSH key for the controller in your connection profile. Click the button for Yes and Save.

     

    Logout and disconnect from the client. Click the “Save profile as” button and save it to the C:\ drive of the server. You will need to reference this connection profile in you script later and you wan tto be able to find it easily.

     

    Click the, “Exit” button on the SSH Client. (In the script, we will be calling for the terminal version of the BiVise SSH Client using the profile)

     

    Next, go to the parent folder on the server where you will want to save the configs and flash backups. Create a Folder called BKUPAPCON. All of the configs and flash tar.gz files will go in there. In this example, the “F:\Backups” folder is my parent folder.

     

    In the F:\Backups parent folder, I also want to create my .vbs script. Go to that folder and create a new text file and name it for the controller you are backing up. Change the file extension to .vbs. Right click on the file and click edit.

     

    The .vbs script should contain the following:

     

    'Written by Neal Ellis 08/28/2013
    'For logging into the AP Controllers and copying out config and flash files
    
    Dim WSHShell
    Set WSHShell = Wscript.CreateObject("Wscript.Shell")
    
    'Declare the variables for the timestamp on the config file
    
    Dim strSafeDate
    Dim strSafeTime
    Dim strDateTime
    
    'Build the format of the timestamp
    strSafeDate = DatePart("yyyy",Date) & Right("0" & DatePart("m",Date), 2) & Right("0" & DatePart("d",Date), 2)
    
    strSafeTime = Right("0" & Hour(Now), 2) & Right("0" & Minute(Now), 2) & Right("0" & Second(Now), 2)
    
    'Set strDateTime equal to a string representation of the current date and time, for use as part of the config name
    strDateTime = strSafeDate & "-" & strSafeTime
    
     'Log Event 4 indicates an informational event
    
    WSHShell.LogEvent 4, "Starting <Your AP Controller> Running-Config Copy"
    
    'Make sure to declare stermc as a system variable first in your windows machine. Go to run and type sysdm.cpl then go to
    'advanced tab and environment variables button. Declare stermc as a new system variable with the path to the stermc.exe
    'Put your bitvise profile somewhere that is easy to get to. I put mine on C:\
    iret = WSHShell.Run("stermc -profile=c:\yourbitviseprofile.bscp" )
    
    'Wait for bitvise to log into the box. Sleep time is in milliseconds. 2000 = 2 seconds
    WScript.Sleep 2000
    
    'this will type "enable " into the first prompt of the Aruba controller
    WSHShell.SendKeys "enable" & vbCr
    
    'Send the keyboard keys to the terminal for your password in Aruba. Replace "yourapcontrollerenablepassword" with your actual password. Keep the quotes around the password.
    WSHShell.SendKeys "yourapcontrollerenablepassword" & vbCr
    
    'send the command to copy the running config to a tftp server with the date and time attached to the file. Replace “IPoftftpserver” with actual IP address. Replace “yourapcontrollername” with the name of your controller.
    
    WSHShell.SendKeys "copy running-config tftp: IPoftftpserver yourapcontrollernamerunningconfig" & strDateTime & ".cfg" & vbCr
    
     WScript.Sleep 1000
    
    ‘Create the backup flash file on the controller.
    WSHShell.SendKeys "backup flash" & vbCr
    
    WScript.Sleep 1000
    
    'send the command to copy the flash backup to a tftp server with the date and time attached to the file. Replace “IPoftftpserver” with actual IP address. Replace “yourapcontrollername” with the name of your controller.
    
    WSHShell.SendKeys "copy flash: flashbackup.tar.gz tftp: IPoftftpserver yourapcontrollernameflashbackup" & strDateTime & ".tar.gz" & vbCr
    
    'exit the enable mode
    
    WSHShell.SendKeys "exit" & vbCr
    
    'exit the prompt to close the session with the controller
    WSHShell.SendKeys "exit" & vbCr
    
    'Wait 5 seconds for the closeout and for the file to be tftp to the server
    WScript.Sleep 5000
    
    On Error Resume Next
    
    'Now we need to copy the config and flash files over to the backup folder where they will be stored and backed up.
    WSHShell.LogEvent 4, "Starting APCON Copy from C:\TFTP-Root"
     
    'Copy the files from tftp-root on the c:\ drive to the backup location. You can eliminate this is you are simply backing
    'up the tftp-root or whatever folder your tftp server puts the file in
    iret3 = WSHShell.Run("xcopy /E /C /Y /D C:\tftp-root\*.* F:\Backups\BKUPAPCON", 1, TRUE)
    
    If iRet3 = 0 Then
       WSHShell.LogEvent 0, "Copying APCON configs and flash backups termintated successfully"
    Else
       WSHShell.LogEvent 1, "Copying APCON configs and flash backups termintated failed"
    End If
    
     If iRet = 0 Then

    WSHShell.LogEvent 0, "Logged into MSAPCON1 successfully!" Else WSHShell.LogEvent 1, "Logged into MSAPCON1 unsuccessfully!" End If Set WSHShell = Nothing Wscript.Quit

     

     

    Now you will need to clean up the tftp-root folder in order to keep it tidy. I suggest creating another .vbs script with the following:

     

    Set fso=CreateObject("Scripting.FileSystemObject") 
    set fldr=fso.getFolder("C:\tftp-root") 
    set fldr2=fso.getFolder("F:\Backups\BKUPAPCON")
    
    for each file in fldr.files 
    if dateDiff("d",file.dateLastModified,Now)>30 then file.delete 
    
    next
    
    for each file in fldr2.files 
    if dateDiff("d",file.dateLastModified,Now)>365 then file.delete 
    
    next 

     

    You will now need to create a scheduled task to run these two scripts.

     

    -Neal Ellis 08/29/2013