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.
#!/bin/bash # 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 ; done
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.