HostDogs
07-25-2002, 08:13 PM
Is it possible to tar up the public_html directory using ssh?
Also what would the command line be?
I figured then I could just point my browser to the tar file and download the file. Also by doing this would the site not be viewable?
Sorry these are such dumb questions
It would be something like this:
tar cvf filename.tar public_html
You can then download that file via ftp.
Lats...
dandanfirema
07-25-2002, 08:27 PM
Or if you want it compressed, you can use tar zcvf filename.tgz /home/username/public_html/*
HostDogs
07-25-2002, 08:31 PM
Thanks
But will it tar everthing up and make the site unviewable? Or does it make a copy of everything?
Thanks again for your replies
chuckt101
07-25-2002, 08:34 PM
Host Dogs
It doesnt delete anything. Just make sure you have the hd space allocation available and use the previously mentioned commands.
HostDogs
07-25-2002, 08:42 PM
I would guess to untar it would be
untar zcfv filename.tgz public_html
Or is it a different command all together?
Thanks again
dandanfirema
07-25-2002, 08:43 PM
replace the c with an x
tar zxvf filename
Something like:
tar xvf filename.tar
that will extract your files, depending on where you are at the time within your site.
Lats...
tar gz it its better for zipping dir's
Mar-y-Sol
07-25-2002, 09:40 PM
For what is that command
May I ask?
driverdave
07-25-2002, 09:58 PM
Here's a really zany command
man tar
It actually tells you most of this thread. Crazy!!
Hang on... a VERY important note.
Make sure that the "tarball" (the file that tar outputs) is NOT in the directory/directories that you archive, otherwise you get into an infinite loop, and will fill up your disk pretty quickly.
Essentially, if you're backing up public_html, make sure you're not in public_html, or a subdirectory of it. I strongly suggest including the "z" option in order to compress the files.