Automatic remote FTP FULL BACKUP for just one user

armin654

Well-Known Member
Feb 12, 2014
45
0
6
cPanel Access Level
Root Administrator
Hello friends.
I just want to know is it possible to use Cpanel Scripts to setup a cron to FULL BACKUP a SPECIFIC USER on a remote FTP destination?

Or we will need to write the script from scratch?

Thank you for your reply.
Kind Regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

Are you able to use the backup feature in Web Host Manager? If not, you could manually setup a cron job that packages the account and transfers the archive to the remote server using a utility such as SFTP, SCP, or Rsync.

Thank you.
 

armin654

Well-Known Member
Feb 12, 2014
45
0
6
cPanel Access Level
Root Administrator
Dear friend
Thank you for your kind reply.
What we want to do is not possible using WHM. We have enabled WHM Backup for all of the users.

The main legacy backup is creating weekly backups for all of the users. What we want to do is to have individual FULL Backup schedule for only some users.

Having a script for mysql dump and public_html folder is easy. But i'm seeking to create FULL BACKUP which can be restored on another Cpanel server easily.

Is it possible to use Cpanel Backup scripts individually in crontabs for specific user?
I mean besides the LEGACY BACKUP configurations, we call the backup script to run for only one user on our specified times.

Regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
There are no scripts or features that will automatically move the archive to the remote server via a cron job. It's possible to create a backup for a single account with a command such as:

Code:
/scripts/pkgacct $username
You would have to setup a custom cron job as "root" that runs this command and then moves the archive to the remote server. You must use a utility such as "rsync" or "sftp".

As far as our API, the Backups module with our cPanel API 2 only provides the ability to list backups.

Thank you.
 

armin654

Well-Known Member
Feb 12, 2014
45
0
6
cPanel Access Level
Root Administrator
Dear michael. Thank you for your care on my topic.
Your answer helped me and i think i can solve the issue following your advise.
Best Regards
 

armin654

Well-Known Member
Feb 12, 2014
45
0
6
cPanel Access Level
Root Administrator
Dear michael.
There is only one issue. If we create fullback from Cpanel interface in "Backups > Download or Generate a Full Website Backup" we will have the fullbackup around 100MB but when we run the following command the result with be around 200MB
/scripts/pkgacct --compress harmonic

Is there anyway to fix this extra space issue? Why this one is bigger?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

You can extract both archives and review the disk space usage from the contents to see what additional content is backed up when using the /scripts/pkgacct utility.

Thank you.