Quota Howto: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
New page: 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 pr...
 
No edit summary
Line 1: Line 1:
Debian
Try http://www.debianhelp.co.uk/Webmin.htm
Cobalt products, manual Quota setting, semi-automatic ;)
Cobalt products, manual Quota setting, semi-automatic ;)



Revision as of 10:40, 21 August 2007

Debian

Try http://www.debianhelp.co.uk/Webmin.htm


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