I wrote the simple script loop for cpanel backup with –skiphomedir option. This is useful for my own note.

The script is very simple. It just does loop cpanel backup with –skiphomedir option. It is very useful to back up cpanel account configuration with MySQL databases. If you want to just back up databases, head over to this link here.

# Shell script to back up cpanel account with --skiphomedir option

for i in `ls -A /var/cpanel/users` ; 
do /usr/local/cpanel/scripts/pkgacct --skiphomedir $i /backup/skiphomedir ;


You can also just run the command without to use the script. The reason I write the script is that I want to use it on the cron job.

Leave a Reply

Your email address will not be published. Required fields are marked *