Forum Moderators: phranque

Message Too Old, No Replies

How to backup entire site via TAR command?

         

irock

8:50 am on Dec 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I forgot the command on how to use TAR command for site backup in root. Could anyone provide an example?

Thanks!

coopster

7:12 pm on Dec 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You want to make a tarball of your documentroot?
cd /usr/local/apache/htdocs/mydocumentroot 
tar cvzf /usr/local/apache/htdocs/mydocumentroot$(date '+%F_%H%I%S%P').tgz .

I like to append a timestamp to the end of it ...

irock

2:57 am on Dec 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow cop,

You certainly know your Unix stuff... :) Thanks.

skinter

4:45 am on Dec 9, 2005 (gmt 0)

10+ Year Member



If ever you are having trouble use man; I.E. 'man tar', or 'man command-name-here'.

The manual is your friend.