Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have website using magento installed in ubuntu ec2 server. I would like to do a backup of the whole magento website. I stumbled on an article that tells me to run this command

http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server

mysqldump -h DBHOST -u DBUSER -pDBPASS --single-transaction DBNAME > data.sql

Question is: In what directory do I run the above command? should I run it in home/ubuntu or in var/www/magento which is the root of the magento, or does it matter at all?

Thanks!

share|improve this question
up vote 3 down vote accepted

Doesn't matter what directory you run the command in, however it will save the sql dump file into the folder your currently in if using SSH to run the command. If you would like to save the file in an alternative path or should you be running it using a cron job then simply edit the last string with the full path you'd like to save the file too, i.e DBNAME > /path/you/want/data.sql.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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