5

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?

4 Answers4

11

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:

200920718_incr_prod_somedbserver01.tgz

200920719_incr_prod_somedbserver01.tgz

200920720_full_prod_somedbserver01.tgz

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.

YYYMMDD--full|incr--environment--servername|clustername?|virtualpool

osij2is
  • 3,885
1

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.

eleven81
  • 417
0

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.

Adam Brand
  • 6,157
0

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

whereas

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

Fire Crow
  • 245