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

I was wondering when you guys have to backup a database or any directory in a server, what would be a good name to call them. For instance, database-2009-07-20.sql or directory_07_20_09.tar.gz

Is there any standard for this?

share|improve this question
up vote 10 down vote accepted

Usually the date (YYYYMMDD) for sorting and either the environment itself or the servername after the date. Putting the date first allows for quick sorting at the command line. You could also include whether the backup was a full or incremental backup so if need to do a restoration, you could easily find the last full backup and all the incrementals in between. So for example:




So something like this is my usual format. Again, there may be better alternatives, but the ideas are all fairly the same. I wouldn't be surprised if there were other ways to do this, but I find this methodology simple and easy to navigate.


share|improve this answer
+1 - Embrace ISO-format dates! MM-DD-YYYY and DD-MM-YYYY are EVIL. – Evan Anderson Jul 20 '09 at 14:54

I make sure to always include in the filename the date and time the backup was made. Just in case something happens on the filesystem such that the date and time are modified, such as copying the backup to some other medium.

share|improve this answer

I usually go with a name that has the db name and whether it is full, differential, or transaction (for SQL Server). Like database-full.bak.

share|improve this answer

It depends on what your process for rolling back is, if your rollback script/app requires a certain date format etc.

I prefer

bak.filename because then searches for ^filename only bring up current versions


filename.bak will show up in a search for ^filename

share|improve this answer

Your Answer


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