Protect Your Investment and DO BACKUPS

by 7 comments
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!
#internet marketing #backups #investment #protect #site backup software
  • 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.
    • 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 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 = ""; // 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 = ""; // 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");

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



      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.
  • 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.

Next Topics on Trending Feed