Godaddy Full Website Backup on a Shared Hosting Account

I had been grappling with this problem since there is no straight forward backup website button in the godaddy’s control panel. PHP scripts seem to run into script timeouts or http timeouts because of the mammoth size of the website.

Heres the solution with help and information from:
http://www.bala-krishna.com/permission-denied-error-with-godaddy-cron-job

Bala Krishna has an excellent writeup on how to use the cron job on godaddy and to avoid the permissions error.

  1. Hence create a shell script file called sitebackup.sh
  2. Copy and paste the following:
    /bin/sh tar -cvvf /$HOME/html/fullsite.tgz .
  3. Save it.
  4. Upload to godaddy.
  5. Go into the control panel and locate the Cron Manager.
  6. Add a new Cron Job and Browse for the script you uploaded.

The backup should be created in the root of your web folder accessible via FTP or the web.

25 Responses to “Godaddy Full Website Backup on a Shared Hosting Account”


  • GoDaddy has new rules for running CRON jobs (see below).

    So your script will have to be like this:

    Bash: #!/bin/bash
    tar -cvvf /$HOME/html/fullsite.tgz

    The Command field is the script or executable that runs at a specified frequency. Click Browse to locate a file in your hosting account. The full file name of your selection is placed into this editable field.

    Cron commands are typically script files that have executable permission and specify their interpreter as the first line of the file. For example, a first line of “#!/usr/bin/perl” directs the system to run the perl language interpreter for the file.

    Your Shared Hosting account supports the following languages and associated interpreter lines:

    * Perl: #!/usr/bin/perl
    * Python 2.2: #!/usr/bin/python2.2
    * Python 2.3: #!/usr/bin/python2.3
    * Python 2.4: #!/usr/bin/python2.4
    * Ruby: #!/usr/local/bin/ruby
    * Bash: #!/bin/bash

    The installed versions of PHP 4 and PHP 5 do not support the interpreter specification in a PHP file. In order to run a PHP script via Cron, you must specify the interpreter manually. For example:

    * PHP 4: /web/cgi-bin/php “$HOME/html/test.php”
    * PHP 5: /web/cgi-bin/php5 “$HOME/html/test.php5″

    Note: In this example script, “$HOME” represents the full path to your Shared Hosting account. The actual path to your account will be provided if you select the script from your account using the Browse button.

  • To bad that they do not have their own backup system. :(

  • Excellent thank you for sharing this information, good continuation for your blog

  • I was having problems with this also. Instead of using php whatever, I just followed the info here http://www.fortasse.com/2010/01/tutorials/tutorial-automatic-backup-script/ and used a regular shell script instead. It is true, the rules have changed. I kept getting permission denied and undefined term errors. The post above along with yours seems to have helped a lot. Thanks!

  • Thanks for the excellent post. I loved reading it!

  • Superb work. You have got a new regular reader. Please keep up the great posts and I look forward to more of your newsworthy posts.

  • Weird, I was searching for sites related to hosting and specifically prices on hosting linux plan, and your blog made it on Bing.

  • I always learn so much from these posts, thank you!

  • Your RSS feed doesn’t work in my browser (google chrome) how can I fix it?

  • I have been trying to Gain access to this site for a while. I was using IE then when I tried Safari, it worked just fine? Just wanted to bring this to your attention.

  • Just letting you know i can’t comment on any of the earlier articles

  • Понравился Ваш сайт! В рунете вообще мало чего дельного в блогах пишут. Всё стараются друг у друга скопировать посты. Года 2 назад было интересно ходить по разным блогам-видно было сразу-люди старались писать посты..а щас уже только для яндекса и стараются. Вообщем желаю продолжать Вам в Том же духе.
    С уважением Ваш читатель.

  • Gut zu Wissen. Kommt hier noch ein Folgeartikel? Würde sehr gern einiges mehr darüber erfahren. Könntest du mir per E-Mail eine Antwort geben?

  • Outstanding article. There’s a lot of beneficial info here, though I did want to let you know something – I am running Ubuntu with the up-to-date beta of Opera, and the design of your website is kind of funky for me. I can understand the articles, but the navigation doesn’t function so solid.

  • Afternoon, It’s nice to stumble upon a good website like this one. Do you care if I used some of your information, as long as I give you a link back?

  • Extremely good information and I like your frame of mind towards improving standards. Thanks for putting this info up. This is EXACTLY what I have been searching for. Always keep blogging. Looking forward to reading your following post.

  • I like web design a lot. Your website is very nice. Do you guys know any good web classes that I can take?

  • Nice Website. You should think more about RSS Feeds as a traffic source. They bring me a nice bit of traffic.

  • hey, I added ur site to my RSS reader. the posts are awesome! :)

  • Great post. Backup is so important.

  • I am testing your idea right now. I hope it will work. I had a PHP script but I have many sites and it timed out..

  • Hmm… I got this:

    sitebackup.sh: Permission denied

    I suppose we cannot run such a script. Any other idea?

  • there are many ways to promote a site, today the most popular is through social networking sites and social bookmarking -.~

Leave a Reply