Quota Howto
Cobalt products, manual Quota setting, semi-automatic ;)
Prerequisites:
=
QuotaTool : http://devel.duluoz.net/quotatool/ Compile this and keep it in your path on the Cobalt product in question.
Getting into postgres:
cat /etc/cobalt/.meta.id <- Copy the alfanumeric output. It's the postgress PW. psql cobalt -u user: <admin> password: <middleclick> (Paste)
Export Quota information for Virtual Hosts:
\o /home/sites/home/users/admin/sites.res select name,quota from vsite;
Export Quota information for users:
\o /home/sites/home/users/admin/users.res select name,quota from users;
Using this information:
cd ~admin cat sites.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > sites.quota cat users.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > users.quota export sites=`cat sites.quota` export users=`cat users.quota` export PATH=.:$PATH for a in $sites ; do
export group=`echo $a | cut -d\| -f1` ; export quota=`echo $a | cut -d\| -f2` ; quotatool -g "$group" -bq "$quota"M -l "$quota"M /home
done for a in $users ; do
export name=`echo $a | cut -d\| -f1` ; export quota=`echo $a | cut -d\| -f2` ; quotatool -u "$name" -bq "$quota"M -l "$quota"M /home
done