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 via WHM

Discussion in 'Data Protection' started by ylesches, May 27, 2010.

  1. ylesches

    ylesches Registered

    Joined:
    Apr 21, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Simple question: How do I run a manual backup via WHM of all my user accounts? I see I can configure automatic backups on the Configure Backup page, but is there a way to backup manually using the settings I entered on the Configure Backup page?
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    From the shell, you can trigger backups manually on demand and also have alternative backup methods available as well ....

    However, from WHM backups run on a schedule .....

    From Cpanel though, you can run a manual backup anytime on an account by account basis from within the account's Cpanel control panel .....

    I personally like to build 'cpmove' archives with /scripts/pkgacct when I need to make a backup snapshot of an account.
     
  3. ylesches

    ylesches Registered

    Joined:
    Apr 21, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    What shell command would I run to initiate a complete server backup according to the settings in WHM? Is that even possible?
     
  4. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    From the shell, you can trigger backups manually
    >> i want to to ran manually backup from the Shell, please give the command for that.
     
  5. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    17
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    /scripts/cpbackup --force

    At the shell command prompt:

    Code:
    # /scripts/cpbackup --force
    will start a full cPanel backup at any time, using the settings in /etc/cpbackup.conf (which are set in the WebHost Manager at Main >> Backup >> Configure Backup).

    There is no provision for doing this from the WebHost Manager. It must be done from the shell.
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    nice command

    what i want to do is for our VPS server we are talking remotely backup & i have select daily/weekly backup option, the query is daily backup is done but not weekly
     
  7. InoxHost

    InoxHost Registered

    Joined:
    May 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    You just need to select daily backup, it will include weekly and monthly too. Just exclude monthly backup if you dont want it. If you have done exactly same way, there should be some problem with weekly backup, sometimes load on the server kills backup process, not usually though. You need to check your backup logs in order trace exact error...
     
  8. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    250
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Seems you are in a vps and usign ftp backup options. So it will tar the backup and upload to remote server. If you have really big accounts , there is a chance the gzip took a lot resources and your vps provider killed your backup process .
     
  9. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    where can i get the backup logs ?
     
  10. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    17
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    /usr/local/cpanel/logs/cpbackup

    Each time cpbackup runs, it writes a new log file in /usr/local/cpanel/logs/cpbackup/. Check the timestamps of the files to find the newest one.
     
  11. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    I ran this command

    # /scripts/cpbackup --force

    & got following output
    [cpbackup] Process started in background.
    [cpbackup] Log file: /usr/local/cpanel/logs/cpbackup/1281603263.log

    How do i come to know that this task is finished ?
     
  12. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    17
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Watch the logs

    Each backup run will have its own log file in /usr/local/cpanel/logs/cpbackup. The logs have numerical filenames; look for the most recent timestamp. You can use "tail -f" to watch the file while it is being written.
     
  13. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Ok! got it .

    How can i get the PID of this process ?
     
  14. Rnjt

    Rnjt Registered

    Joined:
    Nov 25, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I ran the command /scripts/cpbackup but it backed up only few accounts from the 800 cpanel account.

    Other account are not backed up..

    Regards,
    Rnjt
     
  15. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    @Nilesh : Use the command ps aux | grep cpback and you will be able to find the PID of the process along with some other informations.


    @Rnjt : Did you check the logs. If the other accounts are not backed up there will be some errors and you will be able to find the errors in the logs. Please post your log details here.
     
  16. Rnjt

    Rnjt Registered

    Joined:
    Nov 25, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    @Varada : I have checked the logs but there is no any error..
     
  17. Rnjt

    Rnjt Registered

    Joined:
    Nov 25, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes..I did but there is nothing in the logs..
     
  18. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    It is strange you did not find any errors. Can you paste the last part of the log here?
     
  19. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    17
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It sounds like Rnjt may have selected only specific users to be backed up. In the WebHost Manager, click Main >> Backup >> Configure Backup, and at the very bottom of the page, next to Select Specific Users, click Select >>. A new window will open, showing which users are selected to have backups run.

    Also, if the timestamp on an account's existing backup file is not old enough, the account will not be backed up. If daily backup is selected, and the timestamp on the backup file is not at least 24 hours old, the account will be skipped. If weekly backup is selected and the timestamp is not at least a week old, the backup will be skipped, and the same rule applies to monthly backups.
     
  20. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi Jared,

    That's a possibility ! Good finding!
     
Loading...

Share This Page