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.

cronjob for auto daily backups

Discussion in 'General Discussion' started by chadi, Apr 20, 2004.

  1. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    how do i create a cronjob (ok i know the button is in cpanel lol) for a script to do auto backups on my second mounted hard drive for certain sites only (not all)?
     
  2. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    You can create a cronjob from shell by
    # crontab -e

    Syntax:
    minute hour day-of-month month-of-year day-of-week tar /path/to/your/file /path/to/store/yourtarfiles

    Ex:
    30 18 * * * tar /var/www/html/ /home/user/

    Regards,

    Bright:)
     
  3. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Ok but how do i tell it to connect to the second mounted drive? How do I pull info on the drive as well?

    Please explain how to restore, see complete details (free space, used space, etc.) via shell for my 2nd drive. Thanks.
     
    #3 chadi, Apr 26, 2004
    Last edited: Apr 26, 2004
  4. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Another thing, the path FROM and TO my files?

    I'm not sure what they should be in the command when I type but I'm on RHE Linux so what is the default for that?
     
  5. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Ok If someone loves me please respond

    :p
     
  6. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    anyone?
     
  7. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    no one?
     
  8. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
  9. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    why is it so difficult to answer a question?
     
    #9 chadi, May 1, 2004
    Last edited: May 2, 2004
  10. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    This is a SUPPORT FORUM as stated on cPanel's SUPPORT page. It doesn't mention anything about "official" or not. You're obviously not a cPanel tech or admin so don't bother speaking on their behalf and telling what is and is not. They can speak for themeselves. Also, "cronjob" is part of cPanel so therefore it is for them to "support" their control panel features. Think about that before you type your opinions on others' behalf.
     
  11. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    What thaphantom said is pretty much true, but I'll try to rephrase it a little nicer.

    Cpanel forums is a support forum for the cpanel product, but not a source of support from the cpanel team. Once in a while one of them will try to help out, but mainly what this forum is, or has been since I came here, is a place for cpanel users to help each other out. For cpanel support, you need to submit a support ticket, but you are required to try your server or hosting provider first.

    Cronjob isn't a part of cpanel. Cronjob is a program on the server. Cpanel is merely an interface to make some server admin jobs easier. Therefore, it's not cpanels job to teach anyone how to use the different functions that are available on the server.

    Now, for your question, to do backups on a 2nd drive, you put your backup directory on that drive, use a script to create backups to save in the backup directory, and since that directory is on the 2nd drive, that's where the backups will be.
     
  12. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    You said it all incorrectly and impolitely, unprofessionally using foul language and childish manner. You're ignored.

    Squirrel, cPanel doesn't state that the cPanel forums are NOT official, so am I born knowing this? They should be clear about this. You cannot assume a person comes onto the board as a newbie and automatically knows that the forums are not OFFICIAL support.

    Phantom, you're so naive I'm so happy I'm not who you are. Clearly, you're angry because you cannot think of a smarter response I gave you, therefore respond in a more adult manner.
     
  13. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Once again, very happy I'm not you. :D
     
  14. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    You would need to create or have created, a script that is specific to what you ask. Then refer to that script within the Cron job settings.

    You are also correct when you stated, "How is one supposed to know beforehand, this is not an Official Support Forum?" or words to the effect. Unless someone states in their sig that they are with DarkOrb, everyone is just another Licenesed Owner of Cpanel -- for the most part. There are no Moderators here and it's just the blind helping the blind.

    So, if someone posts a reply to question, be thankful. If no one does, pass the question on to DarkOrb using the Support Center link in WHM.

    Most of us here do take time to help others, but as you've already seen, we each post with our own style. ;)
     
  15. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    thanks for being a gentleman unlike someone else...and for replying with help

    the problem is i don't know what the actual script is but i know my 2nd drive is already mounted to whatever letter (i'll find out in whm)

    so what would the command line be?
     
  16. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    can someone please help?
     
  17. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Your question has already been answered.

    " You would need to create or have created, a script that is specific to what you ask. Then refer to that script within the Cron job settings."

    What I would suggest is to just use WHM > Backup in the way it was meant to be used and set it for Incremental Backup -- which is faster.
     
  18. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    If i'm not mistaking I thought cPanel doesn't recognize second hard drives? Or am I wrong? I hope I'm wrong because this would be totally easier and make it more simple in steps. I know nothing much about ssh and scripts. My previous question was what is the script/command line.
     
  19. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Dont' know why you'd think WHM doesn't recognize a second hard drive? As long as it has been properly formatted and mounted, you need ony refer to it by name within WHM > Backup, when you set you backup options.

    Do a df -lh in shell to see what the second hard drive is called, if you're not sure.
     
Loading...

Share This Page