Results 1 to 6 of 6

Thread: Script to backup my complete hosting to FTP?

  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    25

    Arrow 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


  2. #2
    Junior Member
    Join Date
    Jul 2004
    Posts
    25

    Default

    Anyone out there doing this? Need some help.

  3. #3
    Member
    Join Date
    Mar 2004
    Location
    India
    Posts
    78

    Default

    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.

  4. #4
    Senior Member Jonathan's Avatar
    Join Date
    Mar 2004
    Location
    Daytona Beach, FL / Rochester, NY / Coeur d'Alene, ID
    Posts
    1,229

    Default

    Quote 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

  5. #5
    Senior Member sdjl's Avatar
    Join Date
    Mar 2004
    Location
    London, UK.
    Posts
    502

    Default

    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?

  6. #6
    Senior Member
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    183

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •