Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    May 2008
    Posts
    11

    Default Set day when Weekly backup should run

    Hello,

    Is there any way i can set in WHM the day that weekly backup will start(for example Sunday, or Monday) so that on the same day, every week, the weekly backup will be replaced with the new one ?

    One solution I have found is here but the topic is old and maybe now cPanel have this option: http://forums.cpanel.net/f5/whm-backup-43683.html

    I know there are few topics about this but i haven't found an answer from other topics, so if i missed something please don't get angry and point to the correct page...thank you.

  2. #2
    Member
    Join Date
    Aug 2008
    Location
    Uruguay
    Posts
    55
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Set day when Weekly backup should run

    You can go to the root crontab and set the day there for the cpbackup cronjob.
    Or you can set it in the whm backup configuration.

    Here is the documentation.

    Configure Backup
    Last edited by fi77i; 06-28-2011 at 10:08 AM.

  3. #3
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Set day when Weekly backup should run

    There is a plugin called cronconfig that you can install from:
    WHM > cPanel > Manage Plugins, cronconfig. It can be installed easy enough, and will allow you to edit the time the cronjob runs for upcp and cpbackup.

    And you can change your backup settings from:
    WHM > Backup > Configure Backup, section.

    The above take care of the time backup should run.

    I can't tell you if chirpy's script (in that post you linked) is still workable or if this one, for rotating backups though:
    NDCHost - Clean Backups plug-in for cPanel/WHM
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  4. #4
    Member
    Join Date
    May 2008
    Posts
    11

    Default Re: Set day when Weekly backup should run

    Thanks for the quick response.

    For what I understand, if I change the time when cpbackup will run, it will affect also day when daily backup will be done.

    For example if i want weekly backup to be done on each Monday(day 1 - Weekday is the day of the week you want it to run on 0=Sunday and 6=Saturday) and daily backups to be completed each day of the week, I don't understand how can this can be modified in cron since cpbackup is used for both weekly and daily backups.

    If I'm wrong please correct me.

    Thank you

  5. #5
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Set day when Weekly backup should run

    Not sure I follow you here, my apologies. Just under the Backup Interval settings in the Configure Backup section of WHM there's the Backup Retention setting. I'm not sure editing the cron from the plugin is what you're looking for.
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  6. #6
    Member
    Join Date
    Mar 2005
    Posts
    317

    Default Re: Set day when Weekly backup should run

    Quote Originally Posted by fi77i View Post
    You can go to the root crontab and set the day there for the cpbackup cronjob.
    Or you can set it in the whm backup configuration.

    Here is the documentation.

    Configure Backup
    There is no native ability in cPanel to specify on what day of the week you want the weekly or monthly backups to run if you are running daily backups every day.

    It is a feature that has been requested for a long time.

  7. #7
    Member
    Join Date
    Mar 2005
    Posts
    317

    Default Re: Set day when Weekly backup should run

    Quote Originally Posted by Infopro View Post
    There is a plugin called cronconfig that you can install from:
    WHM > cPanel > Manage Plugins, cronconfig. It can be installed easy enough, and will allow you to edit the time the cronjob runs for upcp and cpbackup.
    Although this plugin allows you to set the time that cpbackup runs each day, it's doesn't allow you to specify on which day of the week the weekly or monthly backups will run.

  8. #8
    Member
    Join Date
    Mar 2005
    Posts
    317

    Default Re: Set day when Weekly backup should run

    Here's one of the many threads where this has been brought up in the past http://forums.cpanel.net/f334/align-...th-143901.html

    The thread has been closed because the hardlinking feature has supposedly dealt with the problem.

    I just enabled the experimental (?) hardlinking feature on my biggest server which can take up to 12 hours to do a weekly/monthly backup and I'll see if it makes any difference.

    I personally would like to see the same configuration options that are available in Enkompass so that I can control the exact days that weekly/monthly backups are created.
    Last edited by mikelegg; 06-29-2011 at 10:47 PM.

  9. #9
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Set day when Weekly backup should run

    You could always cron copy the existing backups with a secondary cron job that simply copies the existing daily backups on a weekly or monthly basis without having weekly and monthly backups retained or created (by unchecking weekly and monthly in WHM > Backup > Configure Backup > Backup Retention field). The following cron would work for weekly to copy the existing daily data:

    Code:
    0 1 * * 6 /bin/cp -R /backup/cpbackup/daily/* /backup/cpbackup/weekly/
    You would need to create the weekly folder if it doesn't already exist:

    Code:
    mkdir -p /backup/cpbackup/weekly
    This would be different than a hardlink as it would actually contain the data and not be linking to the daily data. This would run the cron at 1:00am server time on Saturdays.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. let weekly and monthly backup to run at a specific time
    By ikillbill in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-29-2011, 06:16 AM
  2. How to set day for Monthly/Weekly backups?
    By nicklas in forum Data Protection
    Replies: 0
    Last Post: 11-21-2010, 10:49 AM
  3. Choose Day for Weekly Backup
    By mikelegg in forum Archived Feature Requests
    Replies: 2
    Last Post: 03-12-2010, 02:52 PM
  4. weekly/monthly backups to run a particular day
    By alexkb in forum Data Protection
    Replies: 1
    Last Post: 02-08-2010, 08:52 PM
  5. Pick a day for weekly backup
    By jamina1 in forum Data Protection
    Replies: 2
    Last Post: 01-14-2009, 01:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube