Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

Automatically delete the third and fourth backup files from airwave daily 

Apr 08, 2015 08:03 AM

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.]
-----------------------------------------------------------------------
# BEGIN AMP CRON ENTRIES

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

# END AMP CRON ENTRIES


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

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.