减少Airwave硬盘空间

Airwave数据是根据使用情况一直不断增长的,如果Airwave硬盘空间满了将影响正常使用。可以通过下面几步来减少硬盘空间:

1、减少备份数量

2、减少历史数据留存时间

3、删除没必要的文件

登录Airwave AMPCLI,显示如下:

AirWave Management Platform 8.2.7.1 on localhost.localdomain
  1  Upload File
  2  Download File
  3  Delete File
  4  Backup
  5  Restore
  6  Support
  7  Upgrade
  8  Advanced
  9  Security
 10  Custom Commands
 11  Enter Commands
  q  >> Quit
Your choice: 11

选择11 输入命令行

查看硬盘使用情况:$ df -h

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 75G  9.4G   62G  14% /
devtmpfs              1.9G  164K  1.9G   1% /dev
tmpfs                 1.9G  4.0K  1.9G   1% /dev/shm
/dev/mapper/VolGroup00-LogVol00
                       75G  9.4G   62G  14% /
/dev/sda2              93M   41M   48M  47% /boot
/dev/sda1             200M  260K  200M   1% /boot/efi
tmpfs                  64M  1.3M   63M   2% /var/lib/pgsql/pg_stats_temp

列出文件:$ ls

$ ls
nightly_data001.digest              65 bytes  2019-04-20 04:21:53
nightly_data001.tar.gz      57,119,616 bytes  2019-04-20 04:21:52
nightly_data002.digest              65 bytes  2019-04-19 04:20:57
nightly_data002.tar.gz      56,353,712 bytes  2019-04-19 04:20:56
nightly_data003.digest              65 bytes  2019-04-18 04:23:59
nightly_data003.tar.gz      55,912,275 bytes  2019-04-18 04:23:59
nightly_data004.digest              65 bytes  2019-04-17 04:24:39
nightly_data004.tar.gz      55,698,875 bytes  2019-04-17 04:24:39
$ ls *gz
nightly_data001.tar.gz      57,119,616 bytes  2019-04-20 04:21:52
nightly_data002.tar.gz      56,353,712 bytes  2019-04-19 04:20:56
nightly_data003.tar.gz      55,912,275 bytes  2019-04-18 04:23:59
nightly_data004.tar.gz      55,698,875 bytes  2019-04-17 04:24:39

手动删除文件:$ rm

$ rm nightly_data004.tar.gz
Remove nightly_data004.tar.gz? y

清理脚本:cleanup

请注意,单个清理步骤仅对/ var / ampcli / user中的文件有效,该文件是ampadmin用户的登录目录。您可以使用另一个目标来查看系统中其他位置的文件

$ cleanup
There are 22,569,560 bytes of files to clean up.
Show files, Delete them, or Quit? (sdQ) 

这包括日志文件,旧的源文件,升级前的备份等。 您将确认删除,并可以选择查看列表。

There are 22,569,560 bytes of files to clean up.
Show files, Delete them, or Quit? (sdQ) s
/var/log/jitterentropy.log.3.gz
/var/log/httpd/access_log.2019-04-19.gz
/var/log/httpd/access_log.2019-04-18.gz
/var/log/httpd/error_log.2019-04-18.gz
/var/log/httpd/access_log.2019-04-20.gz
/var/log/httpd/error_log.2019-04-19.gz
/var/log/httpd/error_log.2019-04-20.gz
/var/log/pgsql.2.gz
/var/log/audit/audit.log.3
/var/log/audit/audit.log.2
/var/log/audit/audit.log.4
......
Show files, Delete them, or Quit? (sdQ) d
All cleaned up.
0

发表评论

电子邮件地址不会被公开。 必填项已用*标注