Category Archives: linux

postgresql vacumm disk space

Run vacuumdb without increasing disk space:

service postgresql stop
mv /var/lib/postgresql/9.5/main /mnt/new_disk
ln -s /mnt/new-disk/main /var/lib/postgresql/9.5
chown postgres:postgres /mnt/new-disk
service postgresql start
vacuumdb –all –full
service postgresql stop
rm /var/lib/postgresql/9.5/main
mv /mnt/new_disk/main /var/lib/postgresql/9.5
service postgresql start

[ERROR] Exception occured: ISPConfigOSException -> Command mount -o remount

wget -O - https://get.ispconfig.org | sh -s --
[ERROR] Exception occured: ISPConfigOSException -> Command mount -o remount / 2>&1 && quotaoff -avug 2>&1 && quotacheck -avugm 2>&1 && quotaon -avug 2>&1 failed. (/ispconfig.ai.php:15)

Fix OpenVZ install issue
sed -i 's/mount -o remount/echo/' /tmp/ispconfig-ai/lib/os/class.ISPConfigDebianOS.inc.php
php -f /tmp/ispconfig-ai/ispconfig.ai.php

WARNING! This script will reconfigure your complete server!
It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
Type 'yes' if you really want to continue:
yes