Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Manual backup

Discussion in 'General Discussion' started by ramil, Jun 30, 2005.

  1. ramil

    ramil Active Member

    Joined:
    Dec 28, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    Is it possible to run a backup command from command-line, with WHM backup configuration options?

    Thanks
     
  2. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    India
    /scripts/cpbackup
     
  3. ramil

    ramil Active Member

    Joined:
    Dec 28, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    I did it, but got a message:

    =======
    Backup is not done today as per whm backup settings at /scripts/cpbackup line 158.
    =======

    But if I want to make a manual backup???
     
  4. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    India
    make sure that you have configured WHM backup correctly. Check Days to run backup in the WHM>>configure backup. If the days are not marked then mark the days and try again.
     
  5. taotoon

    taotoon Well-Known Member

    Joined:
    Nov 14, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    166
    something wrong with the config.


    btw, you can backup 1 time per 0.5 days according in the /scripts/cpbackup


    Well, If the last backup < 12 hrs. , the scripts will exit.
     
  6. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    You can manually backup a specific account by doing:

    /scripts/pkgacct username

    Usually it will save it to /home in the format backup-date-user.tar.gz.

    You can also kill accounts by doing /scripts/killacct user and restore with /scripts/unpkgacct user

    Regards,
    Alan
     
  7. ChemicalWH

    ChemicalWH Active Member

    Joined:
    Mar 4, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    wrong.. you can backup as many times per day (hour even) as you want if you adjust the script a bit, or add a cronjob to rename the directory it backups too :) gotta love knowledge ! (and yea, most of it i gained by checking this forum really often for over 2 years ;) )
     
  8. greenwater

    greenwater Member

    Joined:
    May 31, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    151
    thanks very good
     
  9. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    7
    Trophy Points:
    318
    Location:
    back woods of NC, USA
    does anybody know how to run /scripts/cpbackup from ssh and then close the SSH session without the backup stopping?
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,472
    Likes Received:
    20
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Yup, this should work (does for me on the latest builds on CentOS):

    /scripts/cpbackup &
     
  11. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    7
    Trophy Points:
    318
    Location:
    back woods of NC, USA
    nope ..when I close the ssh session it dies. :(
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,472
    Likes Received:
    20
    Trophy Points:
    463
    Location:
    Go on, have a guess
    I was afraid of that. Unfortunately, I don't know what controls whether it lives or dies when you exit when the job is spawned. I too have seen it fail :eek:
     
  13. jonathanalia

    jonathanalia Member
    PartnerNOC

    Joined:
    Apr 20, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Use the screen command, just type man screen
     
  14. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    166
    Try running /scripts/cpbackup

    And when it is running type CTRL Z to suspend it, and then type bg to put it into background.
     
  15. lbccserv

    lbccserv Active Member

    Joined:
    Mar 23, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    On a side note - I wish there was a script to:

    A) run the backup NOW
    and B) NOT FREAKING COMPRESS IT!

    This was my problem as my drive died the other day, and it was being forced to mount readonly, despite manually doing errors=continue, so i had to backup the users other ways. It ended up being a huge pain...and a script like that would be invaluable.
     
  16. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    how about this one

    #!/bin/sh

    /scripts/cpbackup >> /root/backup.log

    save the above as backup.sh

    then run it as nohup /root/backup.sh &

    i think this will let it run after terminal closes
     
Loading...

Share This Page