Common Backup filename
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?
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
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.