I'm the furthest thing you can imagine from a Linux pro, so this may be a bit of a noob question, but I'm running some backups on one of our servers (we don't have an actual SA), and I've recently encountered an annoying problem. When I run the following command to zip the entire current directory (which is normally httpdocs), it seems to include itself in the tarball: (run in httpdocs directory)
tar -zcvf backup.tar.gz .
I think this has only started happening since I've been using the '.' at the end, instead of the an '*', as that wouldn't include .htaccess.
Any ideas? Alternatively, and this is a total noob question, can I run it from outside the directory like so:
tar -zcvf backup.tar.gz httpdocs/.
Would that work?
EDIT: I'm guessing actually just tar -zcvf httpdocs would do the trick...?