
Originally Posted by
brianjking
Anyone have a script that does this? I'd like it to run as a crontab, backup all MySQL databases, all user accounts, and have them be restorable to cPanel, and then copied/downloaded to my local machine via SCP or SFTP so I can burn to a DVD & Store on a RAID 1 hard disk.
Please help! Thanks!

If I understand you correctly, you want to extend the pkgacct functions
to be able to backup all accounts instead of just single accounts?
Code:
#!/bin/bash
IFS="$"
cd /home
ls /var/cpanel/users | grep -v "root\|mysql\|nobody" | while read CPUSER; do
/scripts/pkgacct ${CPUSER}
done
##### INSERT YOUR FTP TRANSFER OR MOVE COMMANDS HERE
FYI: The same thing can be accomplished directly from WHM if you only want to backup and FTP the backups!