Monitoring, Management & Location Tracking

Automatically delete the third and fourth backup files from airwave daily

Aruba Employee
Aruba Employee

This article talks about automatically deleting the nightly backup files form Airwave server such that at any given time only two backups would be present instead of default 4.


Please SSH to the Airwave box and follow the below steps.

Step1: Type the below command.

[root@localhost mercury]# crontab -eu root
[Now press letter “i” from the keyboard. Added the below  lines in bold based on the nightly maintenance starting time. Since the nightly maintenance starts at 04:15 ( default)  in the morning, we are deleting the old nightly backups on the AMP server before the nightly maintenance starts and we always maintain only two backups after every day nightly maintenance.]

15 04 * * * /usr/local/airwave/bin/nightly_maintenance_exclusive /usr/local/airwave/bin/nightly_maintenance


00 04 * * * rm -rf /var/airwave-backup/nightly_data002*


NOTE: Please make sure that we paste the additional lines ( In Bold Italics) after the "# END AMP CRON ENTRIES".

[Now press keys “ESC “ then “:wq “ and hit “ ENTER “ key.]

Step 2: Restart the crond service using the below commands.

[root@localhost mercury]# service crond restart
Stopping crond: [ OK ]
Starting crond: [ OK ]

[root@localhost mercury]# chkconfig crond on

After doing these changes every day we will be seeing only two backups in the /var/airwave-backup/ directory.

Step 3: Navigate to backup directory and manually delete the 3rd and 4th backup files.

# cd /var/airwave-backup/
# rm -rf nightly_data003.tar.gz
# rm -rf nightly_data004.tar.gz

Version history
Revision #:
1 of 1
Last update:
‎04-08-2015 05:03 AM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: