Push Airwave nightly backup files to FTP server

Aruba Employee
Aruba Employee

Introduction : This article talks about pushing the nightly backup files from Airwave to external FTP server


Configuration Steps :


We will need to install the FTP rpm if it is not installed on Airwave by default.

How do i check if FTP is installed or not?

[root@amp mercury]# rpm -qa | grep ftp

If we see a FTP package then we need not install it, else please find the compatible FTP package for your CentOS version.

Below steps help to understand the version/architecture of the CentOS on which Airwave is built on.

[root@amp mercury]# crr
CentOS release 6.2 (Final)

[root@amp mercury]# uname -i

[root@amp mercury]# amp_version

If the Airwave server can reach internet, we can install FTP using the YUM command.

[root@amp mercury]# yum install ftp

If Airwave server is isolated, download the latest FTP package and place it on /root directory of Airwave and run the command below.

[root@amp mercury]# cd /root
[root@amp ~]# rpm -ivh <Name_of_FTP_package>

Once FTP package is installed, please follow the steps below to edit the nightly_maintenance script.

Make a copy of the post_nightly_maintenance.sample file and open it for editting:

# cp /var/airwave/custom/post_nightly_maintenance.sample /var/airwave/custom/post_nightly_maintenance
# vi /var/airwave/custom/post_nightly_maintenance

Paste this to the end of the file:

ftp -inv <ip_address_of_FTP Server><<ENDFTP
user <username> <user_password>
cd <folder_on_FTP_server>
lcd /var/airwave-backup
put nightly_data001.tar.gz nightly_data_`date +%m_%d_%y`.tar.gz

Note: Fill in the IP address, FTP directory and login credential in the above lines.

To test the script, you can run the below command:

# /var/airwave/custom/post_nightly_maintenance

Note: Once the script completes, you can access the FTP server to verify the copied backup file status.

The script will copy the nightly backup daily with the date in the file name to specified FTP server. It does not overwrite existing nightly backups.

Version history
Revision #:
1 of 1
Last update:
‎07-04-2014 03:02 AM
Updated by:
Labels (1)

Thanks for this!  it helps a lot!  I ended up needing to tweak it a bit for it to work for me..  






quote USER $USER



prompt off

cd Airwave

lcd /var/airwave-backup

put nightly_data001.tar.gz nightly_data_`date +%m_%d_%y`.tar.gz



I am Assuming that this will also work for a TFTP server as well?

Thanks for the guide, the script works apart from the 'date +%m_%d_%y' it doesn't replace the string with the current date for the file transfered over FTP.


Is this string translated by the FTP client on Airwave or the FTP server i'm using?










The date works on our implementation..  here is the exact text from the post_nightly_maintenance (email and password changed)


# Copyright (c) 2001-2015, Aruba Networks, Inc.
# This material contains trade secrets and confidential information of Aruba
# Networks, Inc.
# Any use, reproduction, disclosure or dissemination is strictly prohibited
# without the explicit written permission of Aruba Networks, Inc.
# All rights reserved.

# After nightly maintenance, an executable script or program at
# /var/airwave/custom/post_nightly_maintenance will be executed.
# Make sure the script is executable. The executable will be run
# as the 'root' superuser, so be sure that the permissions prevent
# unauthorized users from making modifications to it.

# This sample script will be overwritten any time the system is upgraded or
# reinstalled.

# A common use for this script is to copy nightly backups to another server:
# rsync -a /var/airwave-backup/*001* \
# backup@backupserver.example.com:/backupdir

quote USER $USER
prompt off
cd Airwave
lcd /var/airwave-backup
put nightly_data001.tar.gz nightly_data_`date +%m_%d_%y`.tar.gz



from the FTP site (using box.com) here is an example of the filename:  nightly_data_08_30_15.tar

my script is below and as far as I can see the put statements are the same.


ftp -inv<<ENDFTP
user airwave airwave
cd airwave
lcd /var/airwave-backup
put nightly_data001.tar.gz nightly_data_'date +%m_%d_%y'.tar.gz

Getting an error
[root@svpitcairw1 custom]# /var/airwave/custom/post_nightly_maintenance
/var/airwave/custom/post_nightly_maintenance: line 26: warning: here-document at line 19 delimited by end-of-file (wanted `ENDFTP')
/var/airwave/custom/post_nightly_maintenance: line 19: ftp: command not found

Is there an update to this since 8.2.4 took away root access?  I have tried SCP using the ampadmin user, but that doesn't seem to allow that kind of connection.

Please add FTP functionality into AirWave or get it on the list of feature enhancements.  The automated backup transfer is killing me with several clients who are Windows shops.  We've installed SCP servers on the Windows server and manual downloads from the AW CLI menu system work just fine, it's the automated backups that are failing.  TAC's answer was to install a Linux box to SCP the files to...not a good solution.  TAC case #5324310858 for reference.

Hi answrman, why is it failing?  I have airwave doing an automated backup to a windows server with cygwin but it should work with other SCP servers.  I had to play around with the SCP command but it seems to be working fine now

Hi I had written the same script and running the command given at the end but it is giving an error, any help would be appreciated.

my script file is as follows:
ftp -inv<<ENDFTP
user test test123
cd /home/Airwave
lcd /var/airwave-backup
put nightly_data001.tar.gz nightly_data_`date +%m_%d_%y`.tar.gz
/var/airwave/custom/post_nightly_maintenance Connected to ( 220 Welcome to iict FTP service. 331 Please specify the password. 230 Login successful. 200 Switching to Binary mode. 250 Directory successfully changed. Local directory now /var/airwave-backup local: nightly_data001.tar.gz remote: nightly_data_11_18_17.tar.gz 227 Entering Passive Mode (172,21,100,21,147,214). 553 Could not create file. 221 Goodbye.

All the permissions had been given to the user in the remote system as well as the local sytem.


Just checked at the remote system and set one command



This has got worked for me.I wanted to post the soultion which i got.


thank you.

Search Airheads
Showing results for 
Search instead for 
Did you mean: