Ideal way of taking backup of website and database

Discussion in 'Site & Server Administration' started by pratik, Mar 20, 2010.

  1. #1
    Hi there,

    I manage many websites some small and some big ones. My client always asks me to take backup of there website, which I guess is right.
    All my clients are hosted using cPanel.

    The question here is how should I take backups of the site, so that incase of some problem the latest backup can be restored by the hosting support team. :-?

    In cPanel I find 3 ways of taking backups, namely:

    • Full Backup
    • Home Directory
    • Download a MySQL Database Backup


    Now, in Full Backup what happens is that it generates a full backup and emails me when its done. So that I can download the file on my local machine. This is fine for small websites. But for large websites downloading files over 500MB every alternate week is a problem. Here I have a query. Is it necessary to download the backup file on the local machine? or hosting support team can restore the data directly incase the site goes down or gets hacked? And where is this file located on my FTP, so that I can delete once I have downloaded it?

    In Home Directory Backup, what does it actually contains? All the FTP files, including the sub-domains and addon domains?

    I understand that MySQL DB Backup will backup my DB. But downloading all DB files and Home Directory individually is time consuming (as compared to downloading individual file in Full Backup)

    Please someone could suggest me, the ideal way for taking backup for big and small websites, which if needed would be easy for the hosting support team to restore the same.

    Thanks a ton.


    Regards,
    Pratik
     
    pratik, Mar 20, 2010 IP
  2. dach

    dach Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ideal way is to use a shell script that will do all above things. Check for zyxBackup
     
    dach, Mar 20, 2010 IP
    pratik likes this.
  3. phpcat

    phpcat Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you have Access to WHM and have root access, then you can configure cPanel to do either Daily/Weekly/Monthly backups of all the accounts on the server.
    Of course, you can also choose which ones you want to backup and which ones you dont.
    Send me a PM if you need any help :)
     
    phpcat, Mar 20, 2010 IP
    pratik likes this.
  4. pratik

    pratik Notable Member

    Messages:
    2,306
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #4
    Thanks for the reply.

    Frankly speaking both the suggestions went over my head... ;)
    I understand that dach suggested using a script which I would give a try.
     
    pratik, Mar 21, 2010 IP
  5. azwan

    azwan Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Since the full backups include everything, I usually do a full backup every 6 months or so.
    Then, mysql monthly. There's the WP Backup plugin that will do that for you and email the backup to your email.
    If i upload a lot of photos, then the monthly backup will include wp-content/uploads.
     
    azwan, Mar 21, 2010 IP
  6. plyrjohn404

    plyrjohn404 Peon

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you are on a vps, those full cpanel backups can be quite handy. There is an easy method to backup the full cpanel.

    Login to ssh:

    cd /user/fullcpanelbackup.tar.gz
    /scripts/restorepkg fullcpanelbackup.tar.gz

    And your done :)
     
    plyrjohn404, Mar 21, 2010 IP
  7. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215