Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
JRSweets
Worker
Worker



Joined: Aug 06, 2004
Posts: 192

PostPosted: Tue Oct 19, 2004 6:34 am Reply with quote

I would like to get some peoples point of view on a backup strategy. How often should I back up the db? Should I regularly back up all the files on the site as well?

Are there any tools available to automate these task?

Any thoughts would be appreciated.
 
View user's profile Send private message
beetraham
Regular
Regular



Joined: Dec 13, 2003
Posts: 94
Location: Finland (EU)

PostPosted: Fri Oct 22, 2004 8:39 am Reply with quote

Quote:

I would like to get some peoples point of view on a backup strategy.

How often should I back up the db?


Talking about dynamically evolving databases - ideally, every and each change to the database would be nice to get captured in form of backed-up snapshots. However this is far from reality - depending on the risk analysis, i.e. how great is a value of the accumulated data, you might find yourself backing up your mYSQL databases (1) per day (as a nightly performed back-ups).

Most web hosts offer BACKUP services (1) week without a cost, but as some don't, I'd say it's beneficial to get started with it oneself. My MySQL back-up's experience is limited to ENSIM environment, but it offers a solid basis for implying a fact that most web server management Tools incorporate at some level a possibility to back-up those databases via automized approach.

Please consult your ISP - he should be proficient enough to point out the needed actions for these purposes.

Quote:

Should I regularly back up all the files on the site as well?


As the nature of statically characterized files is exactly what the concept itself is suggesting, you should not have a need to back-up the *hard coded* files at your web server, unless the static content of those files has been changed/altered. At least to me, this is a guideline in which I solely rely - it may take days, before a file has been changed at some sites.

Quote:

Are there any tools available to automate these task?


I'd say that the most easiest way to perform a backup of your webserver's *hard coded files*, is to head down to the web server root folder and issue a following command (I'm making an assumption that you're hosted on a LINUX server);

(1) Moving down to "root folder" of your name based site

> cd $YOUR-WWW-ROOT-FOLDER

(2) creating a compressed tarball out of all contents (of root folder and all the contents below the root folder)


> tar cfz yourfilename.tar.gz *

Please note that you need to necessarily equip the tarball with *tar.gz* suffix, always - otherwise the Tools used for extracting the tarball at some later phase will not be capable of extracting/identifying the *entity* as a compressed format package (though it can be renamed still to proper format afterwards).

Now, should you ever find yourself in a situation that *hardcoded* entities need to be restored (for example due to physical crash of a disk), then you'd extract the backup as follows;


> cd $YOUR-WWW-ROOT-FOLDER

> tar xvfz yourfilename.tar.gz

The above will extract the package content as-is - so if there are any files that should NOT get overwritten at the extraction target folder, then beware - the operation is irreversible, as LINUX server contains no-such thing as a *Trash folder* from which you could retrive the once destroyed data.

BR,

-beetraham

_________________
- Let there be no windows at your home - 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©