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.

Complete Backup method ?

Discussion in 'Data Protection' started by SecondSight, Jul 1, 2004.

  1. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hello !

    I'm totally new to managing a server... I want first to learn how to make a backup.

    I have only one account.

    There is a backup tool in cpanel, but I'm worried about this point : what should I know that is not said ?

    I suppose the backup is done automatically, once you have enabled it in "Configure backup/Backup Status". I see it is set as disabled by the person who installed everything on the server... why ?

    Once I have enabled it, what should I do ? I suppose I must download the compressed file through my ftp client, and, is this all I have to do to backup ?

    I have other questions :
    1-What is the use of choosing "Per Accounts and Entire Mysql Dir" instead of "Per accounts only" ? Why should I choose the second (which has been set default) instead of the first ?
    2-Should I backup raw access logs ? (I don't know what it is)

    Thank you for your help and pieces of advice ! :)

    AJ
     
    #1 SecondSight, Jul 1, 2004
    Last edited: Jul 1, 2004
  2. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    by default the backup comes disabled. there is no issue enabling it.

    there is no need that you download the whole thing using ftp.

    check if you have a folder named /backup.

    make backup type to standard and select daily backup.

    now check if backup destination is /backup. If yes .. SAVE settings.

    you will have daily backup populated at the /backup folder.

    Per Accounts and Entire Mysql Dir : will make a backup of the domain database inside a folder named mysql inside the folder homedir at the /backup/cpbackup/username
    and also a complete backup of /var/lib/mysql

    no need for a raw-access log .. but if u have customers adament about it.. then mayb u should.

    lemme know if u have any further questions.

    while the other one neglects /var/lib/mysql

    i suggest the option
     
  3. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    It seems like everything is ok. :)

    I have one more question (a matter of language :) :

    >>> there is no issue enabling it.
    I don't understand this sentence. In the WHM, I have :
    So "Disabled" is checked. Shoudn't I have "Enabled" checked instead ?

    Thank you ! :)
     
  4. dianaward

    dianaward Well-Known Member

    Joined:
    Dec 9, 2002
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Twitter:
    It depends...

    If you have a backup drive (second hard drive) on your server, just enable backup.

    But...
    If you have only one drive, you can still create a directory named backup and enable the backup, especially if you are planning to stick with only a few of your own domains. But if you plan to be a webhost, you may find that the backups fill up your primary partition and hence overload the server. In that event you need to either (1) create a /backup subdirectory in your /home directory and set the backups to go there, or (2) have a second drive installed and a backup directory set up there, depending on how much room is on that partition.
     
  5. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator

    it shld be enabled :)

    by the way am i tht bad in english;)
     
  6. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    No, you are not :)
    It's just that I don't understand this word : issue.

    I only have one drive and one domain, so it will be saved in the backup directory.

    I have enabled the backup( I've checked the "Enabled" radio button).

    Thank you for your help :)
     
  7. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi SecondSight,

    Since you have only 1 hard disk and I suggest you SSH to your server and manaully backup the entire account by this command:

    1. /scripts/pkgacct2 username
    2. cd /home
    3. chmod 755 *.tar.gz
    4. mv /home/*.tar.gz /home/username
    5. Open a FTP session to your host and download it to your local computer.
    6. Make sure you DELETE it after download as you don't want to leave it there.

    Hope it helps.
     
  8. br3ach

    br3ach Active Member

    Joined:
    Feb 21, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    Is therea script to untar this back into the users directory so it overwrties everything there if you need to restore the files?

    Thanks

    br3ach
     
  9. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    restore accounts

    Hi br3ach,

    I have sent a post before.
    Here I copy and paste for your reference again:

    BACKUP
    SSH to your server and run this command
    /scripts/pkgacct2 username ---> this will tar the user account
    cd /home --> change directory to user home
    chmod 755 username.tar.gz --> set the permission
    mv /home/username.tar.gz /home/youraccount --> move the file to your OWN folder as you wish

    Then open a FTP session and you should be able to see the username.tar.gz at your /home/youraccount folder
    Download it to your local computer.

    ------------------

    RESTORE
    Upload the username.tar.gz to your server.
    SSH to your server and run this command.

    mv /home/youraccount/cpmove-username.tar.gz /home --> move the file to the home directory
    /scripts/restorepkg username --> restore the account fully
    rm cpmove-username.tar.gz --> remove the .tar.gz file
    Lastly go to WHM and DNS/Name Server (BIND)

    Hope this helps.
     
  10. br3ach

    br3ach Active Member

    Joined:
    Feb 21, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    Hi m8

    Thanks for posting :)

    "Lastly go to WHM and DNS/Name Server (BIND)"

    Do you mean:

    "Lastly go to WHM and Restart DNS/Name Server (BIND)"

    Thanks :)

    br3ach
     
  11. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi br3ach,

    Thanks for adding the phrase Restart
     
  12. br3ach

    br3ach Active Member

    Joined:
    Feb 21, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    No probs

    I was asking more than correcting you :p

    I guess you did mean restart after all :)

    Cheers
     
  13. gigli

    gigli Registered

    Joined:
    Jun 28, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Atibaia/SP, Brazil
    U can do that on WHM under Backup Functions.

    Restore a Full Backup/cpmove file

    *Remember to put the backup-....tar.gz file on the indicated directories and type the correct username on the field.
     
  14. gunmuse

    gunmuse Well-Known Member

    Joined:
    Jul 3, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Mexico
    I backed up ALL accounts and had to reimage the main drive.

    So now I have

    /drv2/backup/cpmonthly/blah blah


    How to I RESTORE cpanel using this.

    I am not wanting to do just one user but all 100 users
     
Loading...

Share This Page