Can a Reseller create Full backups via cron?
I've read and found numerous threads on doing backups via cron with all sorts of info.. and well most of it involves "hacks" or something that is not reliable, or just plain outdated!
I'd like to get just the facts maam! On how to create a FULL BACK UP via cron, if it can sfp/scp it out to a remote storage area, great... but I can create my own BASH script to do that.
The setup is a Reseller account on WHM and one of the CPanel accounts needs more backups than the hosts backup system creates, plus more backups is always better!
In /usr/local/cpanel/bin
I have :
I just want to setup a cronjob to do a FULL BACKUP of that account. .then I will pass that off to a BASH script to scp/sftp it elsewhere... 00 00 * * * /usr/local/cpanel/bin/backup --force This will then create the files I've been doing by hand via the CPanel like:
I can script sending them out... I just want the current correct version of doing this.... Thanks.
-rwxr-xr-x 1 root root 81645 Apr 18 15:57 backup
lrwxrwxrwx 1 root root 19 Apr 4 02:15 backupadmin -> admin/Cpanel/backup
-rwxr-xr-x 1 root root 2399 Mar 15 11:35 backup_cmd
-rwx------ 1 root root 56236736 Apr 18 15:56 backup_restore_manager
lrwxrwxrwx 1 root root 6 Apr 4 02:15 backupwrap -> cpwrap
-rwxr-xr-x 1 root root 24613800 Apr 25 04:03 pkgacct
I just want to setup a cronjob to do a FULL BACKUP of that account. .then I will pass that off to a BASH script to scp/sftp it elsewhere... 00 00 * * * /usr/local/cpanel/bin/backup --force This will then create the files I've been doing by hand via the CPanel like:
rw------- 1 ime me 23957795 Apr 26 06:19 backup-4.26.2017_06-18-34_me.tar.gz
-rw------- 1 me me 13184386 Apr 7 17:49 backup-4.7.2017_17-49-18_me.tar.gz
-rw------- 1 me me 30200109 May 3 14:49 backup-5.3.2017_14-47-40_me.tar.gz
I can script sending them out... I just want the current correct version of doing this.... Thanks.
-
Hi, Check the ownership of the owned by root, group is root, howver, it does have read-execute permission to the other group, but these commands may require root access to execute it. However, check if you are able to execute /scripts/pkgacct command from your shell... Check the below link: WHM Backup for Reseller Accounts 0 -
Hello, The ability to configure and schedule backups requires root access to the system. I encourage you to vote and add feedback to the following feature request if you'd like to see this functionality extended to resellers: WHM Backup for Reseller Accounts One potential workaround in the meantime is to access cPanel for the individual accounts you want backed up, and setup a cron job using the command referenced on the feature request here: Automatic Backup of single cPanel account Thank you. 0 -
Hello, Automatic Backup of single cPanel account
This option doesn't appear to be an option:bin]$ pwd /usr/local/cpanel/bin [im bin]$ ./cpapi1 Fileman fullbackup homedir [2017-05-10 14:23:48 -0700] warn [cpapi1] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 121. Cpanel::XML::cpanel_exec_fast(HASH(0x9e2d78), HASH(0x174ca98)) called at bin/apitool.pl line 152 bin::apitool::_run_cpanel_function("yaml", HASH(0x9e2d78)) called at bin/apitool.pl line 117 bin::apitool::_cpanel_api_handler("cpapi1", HASH(0x1745018), "yaml", ARRAY(0x9e2ee0)) called at bin/apitool.pl line 90 bin::apitool::run(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at bin/apitool.pl line 25 warn [cpapi1] Failed to execute /usr/local/cpanel/cpanel: No such file or directory Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 153. [im bin]$ cpapi1 Fileman fullbackup homedir -bash: cpapi1: command not found lrwxrwxrwx 1 root root 7 Apr 4 02:15 cpapi1 -> apitool lrwxrwxrwx 1 root root 7 Apr 4 02:15 cpapi2 -> apitool lrwxrwxrwx 1 root root 7 Apr 4 02:15 cpapi3 -> apitool ]$ ./cpapi1 Fileman fullbackup homedir me@me.invalid [2017-05-10 14:31:15 -0700] warn [cpapi1] Failed to execute /usr/local/cpanel/cpanel: No such file or directory at /usr/local/cpanel/Cpanel/XML.pm line 121. Cpanel::XML::cpanel_exec_fast(HASH(0x9e2d78), HASH(0x24e4280)) called at bin/apitool.pl line 152 bin::apitool::_run_cpanel_function("yaml", HASH(0x9e2d78)) called at bin/apitool.pl line 117 bin::apitool::_cpanel_api_handler("cpapi1", HASH(0x24dc668), "yaml", ARRAY(0x9e2ee0)) called at bin/apitool.pl line 90 bin::apitool::run(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at bin/apitool.pl line 25 warn [cpapi1] Failed to execute /usr/local/cpanel/cpanel: No such file or directory Failed to execute /usr/local/cpanel/cpanel: No such file or directory at bin/apitool.pl line 153.
Any further ideas??? I need to have automated backups above what the host will do... and *manually* doing it is not the way.0 -
[im bin]$ cpapi1 Fileman fullbackup homedir -bash: cpapi1: command not found
Hello, Could you verify which version of cPanel is installed on this system? Thank you.0 -
Hello, Could you verify which version of cPanel is installed on this system? Thank you.
CPanel 64.0.20cPanel Version 64.0 (build 20) Apache Version 2.4.25 PHP Version 5.6.30 MySQL Version 5.6.35 Architecture x86_64 Operating System linux Path to Sendmail /u Path to Perl /u Perl Version 5.10.1 Kernel Version 2.6.32-673.26.1.lve1.4.24.el6.x86_640 -
-bash: cpapi1: command not found
You'd need to report this issue to your web hosting provider to have them take a closer look at why it's not working as expected. Thank you.0
Please sign in to leave a comment.
Comments
6 comments