Work From Home                

Index
 

 Adventure Holiday Chat rooms
 Domains
 
Fishing
 
Free ringtones Free web design  Medical science Medical supplies Movies DVD   Money /Finance    Online games  Online shopping Pathology Pharmacy PayPal Safaris      Security Sedo      Sex info Sexy singles  Travel    

 
 

Banner

 

BACKUP YOUR WEBSITE

Using cPanel and Cron Jobs

Don't be one of the unfortunate statistics and horror stories. You’ve heard it a million times. BACKUP YOUR DATA! If you work from home then it's probably up to you and no one else to take precautionary measures and provide your own work at home insurance - backups are your insurance.

 

The question is, are you backing up?? If you are not, you really really do need to be doing so.

 

Again, let me repeat, you really need to be backing up your website.

 

For those with cPanel running as the administrative tool, you can easily backup your website (files and databases) with cPanel. Here’s how:

  • Login to cPanel. Enter your username and password - if you do not know this information please contact your web host.

    cPanel Login

  • Click the ‘Backup’ icon located on the main screen

    cPanel Icons

  • Click ‘Generate/Download a full backup’

    Full Backup Link

  • *The “Full Backups” screen will display

  • Select your backup location (choose Home Directory)

    Choose Home Directory

  • Make sure your email address is correctly entered (once the backup is complete you will be emailed)

    Enter Email

  • Click Generate Full Backup button

    Click Generate Backup

  • Backup file will be created in your home directory

    File Name

  • Once the full backup of your account has been completed you will receive an email message to the email address you specified

If you cPanel looks different from above don’t panic. Some web hosts setup cpanel differently. Here is an example:

  1. Look for a main toolbar icon labled “Tools”
    Tools
  2. Click “Backup” from the left menu
  3. Follow instructions above starting with "* The “Full Backups” screen will display" above

The backup file will be created on your home root directory. It will be a tar.gz file. This file can then be FTPed off your server to a local drive or CD (or both!) for safe keeping. I recommended doing this weekly at the LEAST.

 

You will have noticed during this process something stating the following (or something similar):

Full Backups allow you to save a complete, compressed copy of all of your site data either to your home directory locally or remotely to an FTP server. Full backups CANNOT be restored by CPanel automatically. Only your server administrator can restore a full backup automatically.

If you want to be able to use CPanel to restore your backup files, you must use the separate HOME, SQL, ALIASES and FILTERS backup features, and then you can restore them.

While this is a true statement keep in mind the following:

  • The full backup contains A LOT of information. It contains MORE than you NEED but ALL that you WANT.
  • Don’t worry! While this file cannot be restored automatically via cPanel, the correct pieces can be extracted and restored manually. It is just one huge zip file. Know that every file has been backedup as well as SQL statements generated for recreating and restoring databases.
  • You should also do a HOME, SQL, ALIASES and FILTERS backup and keep the files made separate to the web server.

 

What you can do is automate this a little. Set up a cron job using the following example:

date=`date -I` ; tar -zcf yourbackup_$date.tar.gz ./public_html

This will backup everything in your Public_html directory - the most frequently altered and accessed part of your web system. It will create a file that looks likes yourbackup_2007-09-23.tar.gz in the home directory, the directory above public_html. You can of course choose any directory to backup. All you need to do is edit the line above. Next set this to run as a cron at a frequency compatable with your web modification/addition schedule and you have a handlable file to FTP to another secure location regularly as a safeguard. There are scripts that can automatically send a copy of the file to you by email, but it depends on the size of the file generated as to whether this in reality is feasable. If you have a remote server for yor web site and a home computer that you don't leave running constantly then a manual FTP of the automated backup file each week is a small price to pay for this insurance. If you are up-loading web pages it takes little extra effort to download the already made backup file through FTP. After all it's already made for you!

After a while you will end up with a number of old and probably useless files in yor home directory. To keep this under control use the following example:

find yourbackup* -mtime +30 -exec rm -r {} \;

This little cron script will delete all files starting with the term yourbackup that are over 30 days old. Edit to whatever is applicable ie. 7 for 7 days, 14 for a fortnight etc.
 
To restore you can also use cron jobs by invoking the folowing command:
 
tar -zxvpf yourbackup.tar.gz --directory /home/test/ 

This command restores the file 'test.backup.tar.gz' into the directory '/home/test/'.

  • z   compress
  • x   extract files
  • v   verbose
  • p   replace permissions with those in the backup-file
  • f   the following argument is the filename

Please beware when executing this command! Any existing file that also exist in the archive will be overwritten.

Instead of using the x for extracting, you could also use t to check the archive (get a complete list of the files that are in the archive). If you're not sure wether a file exists in the backup this is easily done with:

 

tar -ztvpf yourbackup.tar.gz | grep "checkforthisfile"

 

 

 Above all else - BACKUP!

                                                                                                              

Google
 
Sign up for PayPal and start accepting credit card payments instantly.
 
                More from domain.e-pond.info
 
How to find profitable Domain names  
Free ebooks
Affiliate marketing
Money, Wealth and Positive Thinking
Top Search Engine Rankings
Sitemap Generator
Robots.txt file and Sitemaps
Backup websites using cPanel and Cron jobs
RSS Feeds: How to create one for your site  
Creating External JavaScript files 
WAHM (Work At Home Moms) - SBI! Businesses
WAHM-IT!, Work At Home Mums - The Masters Course
Work From Home  

Copyright 2007 domain.e-pond.info. All Rights Reserved

Privacy Policy: Your privacy is important to us. No personal information is recorded in the use of this site.

 

Sitemap