Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Mar 2009
    Posts
    7

    Default Cpbackup --force

    hi,

    i wanted to know , how can i config cPanel backups to run in force mod (i mean the cpnackup cronjob) , i want a way that i can enable cpbackup --force every time it runs via cronjob!

    Thanks

  2. #2
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    To force a backup you will have to run /scripts/cpbackup.

  3. #3
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    As you may or may not know, cPanel does not remove old backups from /backup/cpbackup, even if you terminate a customer. Perhaps this is by design. But in any event, it can waste space over time.

    Tonight I cleaned up some of the backups from old customers. I noticed later that my daily backup did not run. The log says "Daily Backup is up to date". It occurs to me that it must have seen my recent activity in that directory, and assumes that there is no need to run the backup now?

    I tried to re-run /scripts/cpbackup but the same thing occurs.

    Is there a way to truly force the daily backup to run?

    - Scott

  4. #4
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    OK, I figured it out. I had to change the timestamp on the daily directory, to fool cpbackup into running:

    # touch -t 201003160100.00 /backup/cpbackup/daily
    # /scripts/cpbackup --force

    Works!

    FYI, the touch date/time is in the format of YYYYMMDDhhmm.ss -- the above example is setting the directory timestamp to March 16, 2010 at 1AM.

    - Scott

  5. #5
    Member
    Join Date
    Mar 2009
    Posts
    7

    Default

    But non of these are my answers i want to run --force mode for each cron

  6. #6
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    "i want a way that i can enable cpbackup --force every time it runs via cronjob!"

    Can you ask the question again, a different way? I do not understand what you want.

    - Scott

  7. #7
    Member
    Join Date
    Mar 2009
    Posts
    7

    Default

    Yeap i can say that in other way :
    When we config backups in cPanel it creats a CronJob for it!
    but cPanel runs /scripts/cpbackup , and if it has problems with timestamps , will show us an error that :
    Daily Backup is upto date .

    i am looking for a way that cpanel runs : /scripts/cpbackup --force everytime it wanna run backups!

    did you get it?

  8. #8
    Member
    Join Date
    Jul 2004
    Posts
    495

    Default

    Have you tried editing the cron job ? Like maybe:
    #0 6 * * * /scripts/cpbackup --force

  9. #9
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    As I mentioned above, when I used --force, it didn't solve the timestamp problem for me.

    I had to manually 'touch' the directory with an older date.

    Fazaha -- why are you having all these problems with backup? I think you should get help for the problem, rather than trying this "work around".

    - Scott

Similar Threads & Tags
Similar threads

  1. Cpbackup --force
    By fazaha in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-16-2010, 06:40 AM
  2. /scripts/cpbackup --force no longer works?
    By kernow in forum Data Protection
    Replies: 2
    Last Post: 09-29-2008, 12:24 PM
  3. Force cpbackup, regardless of server load
    By verdon in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 04-02-2008, 01:16 PM
  4. /scripts/cpbackup --force
    By benfish in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 11-17-2007, 08:29 AM
  5. need to force backups (/scripts/cpbackup)
    By PPNSteve in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 03-08-2006, 04:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube