How to make full backups for all my cpanel accounts from SSH
How to make full backups for all my cpanel accounts from SSH?
-
Try this: for user in `ls /var/cpanel/users | grep -v "\."`;do /scripts/pkgacct $user;done The backups will be created as cpmove files in the home directory. 0 -
Try this: for user in `ls /var/cpanel/users | grep -v "\."`;do /scripts/pkgacct $user;done The backups will be created as cpmove files in the home directory.
While the above should work, parsing against `ls' output is bad form. Why not use the `/etc/trueuserdomains' file? As well, command substitution with backticks is only recommend for non-POSIX-compatible bourne-shells BashFAQ/082 - Greg's Wiki0 -
Hello :) You could simply enable backups for your accounts by configuring backups per this document: Backup Configuration - Documentation - cPanel Documentation Then, force a backup generation via: /usr/local/cpanel/bin/backup --force
Thank you.0
Please sign in to leave a comment.
Comments
3 comments