Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Does a website using a database, need to be shut down when a backup is being made? (assuming you are not using replication)?


Apologies about the brevity of the question. I have provided more details below:

  • OS: Ubuntu Lucid Lynx (10.04 LTS)
  • web application framework: Symfony (PHP web framework)
  • databases: mysql (v5.1) AND postgresql (v 8.4)

Additional files that need to be backed up:

  1. configuration files (php.ini, httpd.conf etc)
  2. data files in specific folders
  3. cron jobs (bash scripts, PHP scripts, Python scripts, Ruby scripts)

more specific information that may be relevant:

I am running the site on a private virtual server (so I have root access), on a machine hosted on Linode.

share|improve this question
In order to provide specific information can you answer the following? 1: What OS is the server running? 2: what database type/engine? most likely it does not have to but shut down at all but in order to provide a better answer we need more details. – Luma Jul 10 '10 at 2:42
When asking a question please ask the WHOLE question, providing enough information to allow that question to be answered. The title should also be consistent with the question body but not be part of it. In your case the title asks something very different to what is in the body. The better you ask the question the better we can answer it. – John Gardeniers Jul 10 '10 at 3:49

Use mysqldump to back up the mySQL database.

Use pg_dumpall to back up the postgres database.

Use rsync to back up the website files.

You don't need to shutdown the database whilst making the back-up, though depending on the underlying engine used, tables may be locked whilst the dump is running.

share|improve this answer
A good script that uses mysqldump: AutoMySQLBackup, – churnd Jul 11 '10 at 15:39

It depends on your database. Mysql has possibilities to do hot dumps if you use the right database engine.

share|improve this answer

Your Answer


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