Protect Your Investment and DO BACKUPS

by rapidtronics 7 replies
Hi all,

I was just talking to someone and got to thinking that what we were talking about might be helpful information to someone here on the forum. I know alot of you probably already practice some sort of daily or weekly backups of your sites, but I'm betting a LOT of people don't!

Trust me, it is not worth getting caught with your pants down.. You need to back up your valuable sites and all of your hard work. I know first hand. I have actually deleted a complete website because frontpage locked up on me!!! I couldn't believe it. It was the worst feeling in the world. I almost puked because I deleted a paying customer's website! I had to go explain what happened. I had no backup.. Had to start over from scratch.

So before this unfortunate event happens to you, and trust me it is only a matter of time before it happens to all of us. One day you could wake up and your site got hacked and you have no idea how to fix it. But you could if you had a daily backup! I recommend getting a web host that offers daily backups, but more importantly and in addition to that.. Do your own backups!

I know there are other ways to do this through cron jobs and such, but the easiest way for anyone w/o a lot of programming knowledge is to use a software. I personally use Site Backup CP. Here is the link to their site and it is not an affiliate link: Site Backup CP - easy backup for cPanel® websites

If you are an experienced programmer, maybe you can tell us all how to run a cron job to do this?? Thanks!

I just wanted to try and hand out some valuable information and help some warriors.

To your success!
#main internet marketing discussion forum #backups #investment #protect #site backup software
Avatar of Unregistered
  • Profile picture of the author avr
    I know too how it feels to be caught with the pants down. I lost a site once and I looked then for some way to protect all my websites and found Website Backup Software, FTP Backup Tool, MySQL Backups | SiteVault

    It works automatically and I don't even need to complicate with cron jobs and other stuff. It just downloads a copy of a site where I want periodically.
    {{ DiscussionBoard.errors[41762].message }}
    • Profile picture of the author Ryan_Taylor
      This post should probably be moved to the programming board.

      I got sick of manually backing up my sites and found this free script. Just change the applicable data in the "configuration" below and name the file cpanel_backup.php.
      <?php

      // PHP script to allow periodic cPanel backups automatically.
      // Permissions on this file should be 600
      // Place outside your public_html
      // Crontab: 30 3 * * * /usr/local/bin/php /home/username/cpanel_backup.php

      // ********* Configuration *********

      // Info required for cPanel access
      $cpuser = "username"; // Username used to login to CPanel
      $cppass = "password"; // Password used to login to CPanel
      $domain = "yourdomain.com"; // Domain name where CPanel is run
      $skin = "x"; // Set to cPanel skin you use (if x doesn't work try x3)

      // Info required for FTP host
      $ftpuser = "username"; // Username for FTP account
      $ftppass = "password"; // Password for FTP account
      $ftphost = "ftp.yourdomain.com"; // Full hostname or IP address for FTP host
      $ftpmode = "passiveftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)

      // Notification information
      $notifyemail = "your@email"; // Email address to send results

      // Secure or non-secure mode
      $secure = 0; // Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP

      // Set to 1 to have web page result appear in your cron log
      $debug = 1;

      // *********** Don't Touch!! *********

      if ($secure) {
      $url = "ssl://".$domain;
      $port = 2083;
      } else {
      $url = $domain;
      $port = 2082;
      }

      $socket = fsockopen($url,$port);
      if (!$socket) { echo "Failed to open socket connection... Bailing out!\n"; exit; }

      // Encode authentication string
      $authstr = $cpuser.":".$cppass;
      $pass = base64_encode($authstr);

      $params = "dest=$ftpmode&email=$notifyemail&server=$ftphost& user=$ftpuser&pass=$ftppass&submit=Generate Backup";

      // Make POST to cPanel
      fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0\r\n");
      fputs($socket,"Host: $domain\r\n");
      fputs($socket,"Authorization: Basic $pass\r\n");
      fputs($socket,"Connection: Close\r\n");
      fputs($socket,"\r\n");

      // Grab response even if we don't do anything with it.
      while (!feof($socket)) {
      $response = fgets($socket,4096);
      if ($debug) echo $response;
      }

      fclose($socket);

      ?>

      Put the file on the root of your directory, above public_html, and then set a cron job in cpanel.

      To do that, just click "Cron" and use the simple method, enter your email and the following string:

      php -q /home/username/cpanel_backup.php

      Then select the times you want the script to run. I set mine for every Sat at 2a.m.

      That's it. I know very little about coding and managed to get this to work. So if I can do it, you probably can.
      Signature

      {{ DiscussionBoard.errors[43677].message }}
      • Profile picture of the author Jesus Perez
        Great, great stuff. Thanks, guys!
        Signature


        {{ DiscussionBoard.errors[43684].message }}
      • Profile picture of the author rapidtronics
        Good post Ryan.. You're right this post should probably be moved to the programming forum. I was wondering though... Does this method do a backup of your mysql databases?

        Thank you.
        {{ DiscussionBoard.errors[43700].message }}
        • Profile picture of the author Ryan_Taylor
          Originally Posted by rapidtronics View Post

          Good post Ryan.. You're right this post should probably be moved to the programming forum. I was wondering though... Does this method do a backup of your mysql databases?

          Thank you.
          Actually, I think it only backups up the folders and files, which is why I liked it. I could be wrong on that though. Maybe it does both. I'm away from my PC and will have to take a look later.

          If you have WordPress or Joomla, there are plugins that will backup your database and email them to you daily. Otherwise, you can use a free utility like SourceForge.net: AutoMySQLBackup (no affiliation).

          By the way, does HostGator automatically backup and store these for you?
          Signature

          {{ DiscussionBoard.errors[43727].message }}
          • Profile picture of the author rapidtronics
            I'm not sure if hostgator does or not... I talked to the techs at hostmonster and although they do not advertise that they do backups, he said that they do. You could possibly get your site backed up depending on who you talk to in tech support.

            I also use host9 and they do daily backups for you and also advertise this as one of the features offered. The only problem is they only keep 1 copy of your backup from the previous day. So if you did not find out for a couple of days that your site had been hacked, you would be out of luck. That is why I keep up to 5 generations of backups on my hard drive using site bacup cp..
            {{ DiscussionBoard.errors[43735].message }}
  • Profile picture of the author Jesus Perez
    I know...I'm bumping a 3 month old post.

    However, I just wanted to confirm that the software Corey mentioned in the 1st post works very well after buying and running it. (non-aff link)

    It runs locally on your computer and downloads all files (entire home directory as well if you want), mySql databases, emails and filters from any host running Cpanel. That means it should work fine with Hostgator, Lunarpages and Bluehost.

    Here's the kicker...I'm already running Mozy on my PC. That means I just backed up locally and in a few hours, it'll be backed up on Mozy's servers as well.

    Needless to say, it's worth the $29 price tag.

    Don't wait for your host to die (or for your mySQL to get wiped clean by hackers). All hardrives fail.
    Signature


    {{ DiscussionBoard.errors[277531].message }}
Avatar of Unregistered

Trending Topics