How would i go about setting up daily backups of my site

Discussion in 'Site & Server Administration' started by mattonline, Sep 12, 2008.

  1. #1
    How would i go about downloading daily backups of my sites Databases, and then say a monthly backup of its Raw files to my Hard drive on a cron job (automatically)

    I have Shell access (don't know how to use it) if that helps.

    thanks again
     
    mattonline, Sep 12, 2008 IP
  2. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Create a shell script with the proper commands and run it from cron. You will have to stop the sql if you want the raw files tho.
     
    007c, Sep 12, 2008 IP
  3. mattonline

    mattonline Active Member

    Messages:
    897
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #3
    aaw well i don't know anything about shell, is there any programs out there?
     
    mattonline, Sep 12, 2008 IP
  4. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Camay123, Sep 12, 2008 IP
  5. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    007c, Sep 12, 2008 IP
  6. Jaundice

    Jaundice Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you are willing to learn a bit of shell you could create a script that would do some simple backups...

    #!/bin/bash
    cd /web/root/dir
    tar -cvf web.tar .
    Code (markup):
    If you type the above in a file, you may need to "chmod +x filename" so that you can run it. You'll need to type in the right directory though.

    This would create a file in some top level directory that contained all the material under that directory. You could download and save this file from time to time using your browser (and so could anyone else if it was publicly available).

    If your material is not sensitive and you have turned off directory indexes it may be worth considering.

    Similarly, you could build a script that ran mysqldump to get at your table contents. These could also be run by cron job and download by yourself whenever you decided to do it.

    You'll need to spend some time in the shell futzing around with things while you have the manuals open... :confused:
     
    Jaundice, Sep 12, 2008 IP