The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automatic remote FTP FULL BACKUP for just one user

Discussion in 'Data Protection' started by armin654, Sep 20, 2014.

  1. armin654

    armin654 Well-Known Member

    Joined:
    Feb 12, 2014
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. armin654

    armin654 Well-Known Member

    Joined:
    Feb 12, 2014
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    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
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. armin654

    armin654 Well-Known Member

    Joined:
    Feb 12, 2014
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    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
     
  6. armin654

    armin654 Well-Known Member

    Joined:
    Feb 12, 2014
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    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?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page