Clear archived files in vcenter server: vpostgres

How to clear vpostgres file in vcenter in case of full partitions

Login as root in your vcenter server and enter shell

VMware vCenter Server 7.0.3.02000

Type: vCenter Server with an embedded Platform Services Controller

Connected to service

    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Launch BASH: "shell"

Command> shell
Shell access is granted to root
root@myvcenter [ ~ ]# 

Verify free space on archived partition

root@myvcenter [ ~ ]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 9.3G 0 9.3G 0% /dev
tmpfs 9.3G 1012K 9.3G 1% /dev/shm
tmpfs 9.3G 1.3M 9.3G 1% /run
tmpfs 9.3G 0 9.3G 0% /sys/fs/cgroup
/dev/mapper/vg_root_0-lv_root_0 47G 11G 34G 25% /
tmpfs 9.3G 7.0M 9.3G 1% /tmp
/dev/sda3 488M 30M 422M 7% /boot
/dev/sda2 10M 2.0M 8.1M 20% /boot/efi
/dev/mapper/vg_lvm_snapshot-lv_lvm_snapshot 196G 28K 186G 1% /storage/lvm_snapshot
/dev/mapper/core_vg-core 49G 557M 46G 2% /storage/core
/dev/mapper/log_vg-log 15G 6.9G 7.1G 50% /storage/log
/dev/mapper/db_vg-db 9.8G 1015M 8.3G 11% /storage/db
/dev/mapper/dblog_vg-dblog 15G 353M 14G 3% /storage/dblog
/dev/mapper/seat_vg-seat 25G 778M 23G 4% /storage/seat
/dev/mapper/netdump_vg-netdump 982M 24K 915M 1% /storage/netdump
/dev/mapper/autodeploy_vg-autodeploy 9.8G 40K 9.3G 1% /storage/autodeploy
/dev/mapper/imagebuilder_vg-imagebuilder 9.8G 36K 9.3G 1% /storage/imagebuilder
/dev/mapper/updatemgr_vg-updatemgr 98G 1.7G 92G 2% /storage/updatemgr
/dev/mapper/archive_vg-archive 49G 45G 2.4G 95% /storage/archive
/dev/mapper/vtsdb_vg-vtsdb 25G 32M 24G 1% /storage/vtsdb
/dev/mapper/vtsdblog_vg-vtsdblog 15G 33M 14G 1% /storage/vtsdblog
/dev/mapper/lifecycle_vg-lifecycle 98G 4.3G 89G 5% /storage/lifecycle
root@cag1vmwarevc [ ~ ]#

as you can see we have 95% full on directory /storage/archive
/dev/mapper/archive_vg-archive 49G 45G 2.4G 95% /storage/archive

In the directory /storage/archive I find out the folder vpostgres using 45G

root@myvcenter [ - ]# cd /storage/archive/
root@myvcenter [ /storage/archive ]# du -sh ./*
16K     ./lost+found
45G     ./vpostgres

The directory vpostgress is very important for vsphere but we can delete the older .gz files, for example here i delete all the files older than 60 days

root@myvcenter [ - ]# cd /storage/archive/vpostgres
root@myvcenter [ /storage/archive/vpostgres ]# find *.* -mtime +60 | xargs rm

External Link

Clear vpostgres directory