Script to backup my complete hosting to FTP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DWalley
    Junior Member
    • Jul 2004
    • 25

    #1

    Script to backup my complete hosting to FTP?

    Is there a script that I can run on a weekly basis that will backup all my sites to an FTP that I have running? I have a FTP on a Static address and want to setup a backup.

    Thanks,
    D. Walley

  • DWalley
    Junior Member
    • Jul 2004
    • 25

    #2
    Anyone out there doing this? Need some help.

    Comment

    • Amitabh
      Member
      • Mar 2004
      • 78

      #3
      I haven't done this, but it should be something like this:

      Use the tar/gzip command to create a a single file of you www folder. The use Curl on the command line to ftp the file to your own server.

      Once you have created this script, place this in the Cron table either through the command line or using Cpanel. I am not on a Linux box right now, so can't give you the code for this.

      Comment

      • Jonathan
        Senior Member
        • Mar 2004
        • 1229

        #4
        Originally posted by DWalley
        Is there a script that I can run on a weekly basis that will backup all my sites to an FTP that I have running? I have a FTP on a Static address and want to setup a backup.

        Thanks,
        D. Walley

        Be careful using tar/gzip, especially if its alot of stuff your backing up.
        Simply put it can hog resources and we all know what happens then
        "How can someone be so distracted yet so focused?"
        - C

        Comment

        • sdjl
          Senior Member
          • Mar 2004
          • 502

          #5
          I personally don't see the point of backing up the whole public_html directory. You should maintain your own backup of files and then only backup data that changes regularly. e.g. databases and maybe user uploaded images.

          There are plenty of scripts around that can backup your database for you, the one i personally use and like is AutoMySQLBackup (http://sourceforge.net/projects/automysqlbackup/)

          Once you have that script setup in cron, you can then use an ncftp command line call as another cron to transfer those backed up files.

          Just another suggestion, have you looked into rsync?

          David
          -----
          Do you fear the obsolescence of the metanarrative apparatus of legitimation?

          Comment

          • james
            Senior Member
            • Mar 2004
            • 183

            #6
            Does anyone know of a script that only backs up the files that have changed since the last backup?

            It would have to look at the last modified date on a file I suppose, and if it is newer than the date of the last backup then it would add it to the backup.

            This (smaller) backup could then be ftp'd.

            Comment

            Working...