In trying to back up a website on an apache server this am I ran the following:

gzip -r /var/www/httpd/vhosts/mysite.com/ mysite.gzip

Trying to backup the path to the gzip file. Howvever, after completeion i go to the website url and get the apache welcome screen.

What happened? Is there a way to easily reverse this?

Thank you very much for any help!

link|improve this question
feedback

3 Answers

for file in `find /var/www/httpd/vhosts/mysite.com/`; do gunzip $file; done

You gziped everything in your htdocs root into file.gz file2.gz and it probably errored when it didn't find the file.gzip

link|improve this answer
+1 - better answer than mine. I saw that he'd got the arguments the wrong way around but didn't realise it would have globbed it. He may have gzipped the directory rather than everything in it? – James Lawrie Nov 10 '10 at 18:43
Thank you, apparently it didn't create the file mysite.gzip but instead just replaced all of the files with gzip versions of themselves. Is there a way to reverse that? – Martin Nov 10 '10 at 18:45
my command will reverse it for all the files – Mike Nov 10 '10 at 18:47
is there any chance I can unzip those Mike? – Martin Nov 10 '10 at 18:48
His command is in the answer. – James Lawrie Nov 10 '10 at 18:49
show 6 more comments
feedback

You got your arguments the wrong way around. What's the output of ls -al /var/www/httpd/vhosts/mysite.com/? It might not be a big issue.

link|improve this answer
It lists the contents of the directory. – Martin Nov 10 '10 at 18:47
I know what the command does, I asked for the output not the purpose of the command. Basically I wanted to know what was still in the directory, but see @Mike's answer. – James Lawrie Nov 10 '10 at 18:48
feedback

I know it's too late, but maybe type "man gzip" before running the command?

link|improve this answer
To be fair, man gzip isn't too helpful. There's no examples for basic usage and it only states "gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]" which isn't obvious. – James Lawrie Nov 10 '10 at 18:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.