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.

#!/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.

Leave a Reply

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

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.
Powered By
100% Free SEO Tools - Tool Kits PRO