Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to backup Apache?

Status
Not open for further replies.

SaltyDuke

Programmer
Sep 18, 2002
140
IE
hello.

i'm about to upgrade my version of Apache for the first time and i'd like to backup the version that's already on the system. only problem is...i've never backed up anything before!

i reckon i chould tar/gzip it, but i'm not sure of the fine points (i.e. what parameters to use with the command? how do i get it to tar everything in the Apache directory?)

any pointers/web refs/advice/samples/free money would be greatly appreciated ;-)

thanx in advance!!

TheSaltyDuke [pipe]
 
Well, it's not that easy. There is no such thing as 'apache directory'. Apache's files are usually placed among other system files. BUT - it is not necessary to backup binaries. I think that the only think that should be backed up is configuration file(s). Their placement depends on your distribution. On RedHat, it is /etc/httpd.

For backup, you can use 'tar cvfz archive.tgz files_to_archive'.

One more tip for RedHat: you can list files that came with Apache rpm by 'rpm -q -l apache'.
 
Actually, if you compile from source and specify a prefix, there is an Apache directory. The default directory is /usr/local/apache. //Daniel
 
Find the httpd.conf file using the locate command (locate httpd.conf). Now, open the httpd.conf file in a text editor. Look for the 'ServerRoot /somedir' and 'DocumentRoot /somedir' directives. Just back up each of those directories listed to be 100% safe.


ChrisP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top