Posted on 21 January 2011 by Chris
There are times when you try to update cPanel from the UI and it will fail or will hang. When this happens, you are able to force the update from the comamnd line. SSH into the server as root, then run the following command.
/scripts/upcp --force
This will show you what is going on will normally fix any update issues that you were having, but will also help you to troubleshoot any problem that may come up with the update.
Posted on 18 January 2011 by Chris
If you have ever used cPanel, there may have been a time that a DNS zone was missing even though your domain was already added on. If you have root access, you are able to fix this by using the adddns script. This is located in the /scripts directory, but only if you are using cPanel. So to use this, you will define the domain and the IP that it is for.
/scripts/adddns --domain=site.com --ip=123.456.7.89
That will create a dns zone for the domain site.com with the address on the server of 123.456.7.89. You can then check /var/named/site.com.db to make sure that it created successfully.
Posted on 18 January 2011 by Chris
You are able to create a backup of a cPanel user’s account by using the pkgacct command in the /scripts directory that can be found on any server that has cPanel installed. If you needed to create a backup of the account for a user named user1, you would need to be in a root shell, then run the following command.
/scripts/pkgacct user1
Unfortunately, cPanel backups are limited to 4GB, but using the command line, you are able to surpass that limitation and force it to back up the account by using the following:
/scripts/pkgacct user1 --skip-limit-flag
Adding on the –skip-limit flag will allow it to skip the 4GB limit and create the backup. Then, when the script is finished and the backup has completed, it will tell you the path that it placed the backup and you can move it to whichever directory you would like. If you are creating this for a user that does not have root access, you will want to put it in their home directory as well as chown it to the user so that they are able to download the backup as well.
Posted on 13 January 2011 by Chris
If you are hosting with cPanel and had a domain removed and would like to find out when, you can check in the cPanel access logs like this:
~]#grep cpaneluser /usr/local/cpanel/logs/access_log |grep domain|grep
dodeldomainconfirm
Also, using the same method, you can find out when a subdomain was deleted
~]#grep cpaneluser /usr/local/cpanel/logs/access_log |grep subdomain|grep
dodeldomainconfirm
Be sure to replace cpanel user with the cpanel username that owned the domain and domain or subdomain with the actual domain or subdomain that you are looking for.