Problem doing mysqldump

I am trying to set up an automatic MySQL database backup, but for starters I can’t even get the mysqldump command to work.

When I run the following command:

mysqldump --user usernamehere --password=passwordhere databasehere | gzip > /httpdocs/mydatabase.gz

I get the following message:
-sh: /httpdocs/mydatabase.gz: No such file or directory
mysqldump: Got errno 32 on write

I can provide more info if necessary. Any ideas?

apparently, httpdocs is not in the root directory. try a relative path instead of an absolute path, or provide the correct absolute path.

A big DUH on my part. That was the problem. Thanks longneck!

I am having the same problem, only I have tried numerous paths including /tmp/mytable.sql and /dev/shm/mytable.sql and nothing works.