Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Linux Operating System > Linux Talk > Tips and Tricks
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-11-2005, 12:08 PM   #1 (permalink)
nikolaos77
Junior Member
 
Join Date: Sep 2005
Posts: 2
Default Making a backup

Here is a quick and easy way to make your system backup stuff on your system.

On your cron enter something like

tar -zcvf file.tar.gz /directory/to/tar

Then set the time to do it and then you will have a backup daily Especially the SQL
nikolaos77 is offline   Reply With Quote
Sponsored Links
Old 09-13-2005, 04:52 AM   #2 (permalink)
allon
Senior Member
 
Join Date: Sep 2005
Posts: 104
Default

You know sometimes tarring could fail and whats the backup for that? Sometimes cron don't work, what will we do when that happens?
allon is offline   Reply With Quote
Old 09-14-2005, 07:36 PM   #3 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 36
Default

Well here are a few suggestions of what you can do to verify the integrity of your backup.

For a backup-script it's essential to have working error checking for everything.

For instance;
* what happens when tar fails for some reason?
* how will you handle an interrupted backup?
* what if the mail doesn't get sent or doesn't reach you? (when you implement this feature)

I would advise you to use a logfile and a lockfile. The logfile logs everything your script succeeds or fails to do, as well as what files are being backed up.
This will serve you well when backups don't work or when you need a particular file from your backup and you only have to grep your logfiles to see where the file is located.

The lockfile makes sure that no more than one instance is running of the backup-script at any time. This script should delete the lockfile as the very last thing. This let's you implement a feature which looks for the lockfile at the beginning of the script, and if it's found, you know the previous backup failed or is still running.

It's also a good thing to check the integrity of the backup once it's done.
Checking the archive with tar -t and watching exit statis could probably suffice.

cheers
sandman is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 06:12 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums