Airwave SCP Backup Script

By ozerdo posted Nov 13, 2011 10:35 PM


I've attached a TCL / Expect script that will SCP the nightly backup off of an Airwave server. To use this script, unzip the file and remove the "-generic" extension. There are in-line commands that should help get it running properly on your Airwave server.

I tuned up the script over the past couple of days to include a server name ( for multi-server installations ) and to append a version number, not just a date. 


You can also copy or symlink the script to /var/airwave/custom/post_nightly_maintenance and then hardcode the AMP backup file name. That script will run after nightly maintenance (the process that creates the backup) finishes each morning.

There's a similar script posted at that uses SSH keys instead of a password.

1 comment
1 view


Apr 01, 2016 10:31 AM

I am a new Airwave user and I am trying to create a script that will backup the AMPs to another Linux server.  I am trying to pass my pswd but can't get it to work.  Here is a sample of what I have in my sh file:

scp /var/airwave-backup/nightly_data001.tar.gz john@192.xx.xx.xx:/home/john/testoutput


I have tried adding expect and send but I get an error when I manually run the script. 


expect {
 password: {send "$userPassword\r" ; exp_continue}
 eof exit