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.

How to schedule backups

Discussion in 'General Discussion' started by ErnestoHD, Oct 22, 2010.

  1. ErnestoHD

    ErnestoHD Registered

    Joined:
    Oct 15, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    GDL MX
    Hello:

    Do you know how to schedule backup generation at specifc hour...

    For example: I need that script backup generation starts at Oct 22th 17:00 and backups will be saved in folder /backup/cpbackups/daily/

    Or do you know hos to start the script via SSH?

    I really apreciate your help.

    Thanks in advance!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could edit crontab -e in root SSH and change the cron time:

    Code:
    0 17 * * * /scripts/cpbackup
     
  3. ErnestoHD

    ErnestoHD Registered

    Joined:
    Oct 15, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    GDL MX
    Thanks a lot Tristan:

    I needed to check and modify too, file /etc/cpbackup.conf

    file was configured like this:

    Code:
    BACKUP2 yes
    BACKUPACCTS yes
    BACKUPCHECK yes
    BACKUPDAYS 0
    BACKUPDIR /backups
    BACKUPENABLE yes
    BACKUPFILES yes
    BACKUPFTPDIR
    BACKUPFTPHOST
    BACKUPFTPPASSIVE yes
    BACKUPFTPUSER
    BACKUPINC yes
    BACKUPINT daily
    BACKUPLOGS no
    BACKUPMOUNT no
    BACKUPRETDAILY 1
    BACKUPRETMONTHLY 1
    BACKUPRETWEEKLY 1
    BACKUPTYPE normal
    COMPRESSACCTS yes
    DIEIFNOTMOUNTED no
    GZIPRSYNCOPTS --rsyncable
    MYSQLBACKUP both
    
    but i change BACKUPDAYS 0 by BACKUPDAYS 5 (0 = Sunday)

    or can be force the script /scripts/cpbackup --force

    Anyway very helpful :D
     
Loading...

Share This Page