How to schedule backups

ErnestoHD

Registered
Oct 15, 2010
2
0
51
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!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
348
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
 

ErnestoHD

Registered
Oct 15, 2010
2
0
51
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