Marcin Bielewicz over at dev@iostream.pl has a very nice post on the ins and outs of Emacs backups. The thing about Emacs backups is that they tend to fade into the background and we don’t think much about them until we need them. Happily, when that time comes, it turns out that Emacs probably already has us covered. Even if you don’t do anything up front, Emacs will automatically keep some backups for you.
There are, however, some problems with the default configuration. The most salient one is that the backup files are kept in the same sub-directory as the original file. Almost no one wants that but it’s easy to arrange for them to be kept wherever you like. Most folks specify a dedicated directory to hold them.
But wait. There’s more. You can specify how many backups to keep in a very flexible way. You can keep the N most recent backups and the last M most recent backups. The defaults are probably fine. Long ago I set up other values but I’ve never had occasion to use anything other than the last backup.
The other aspect of Emacs backups is the autosaving function. That’s probably the facility you’re most likely to use. It periodically takes a snapshot of the buffer you’re working in so if a disaster occurs, you can recover with minimal loss of work.
All of this explained in detail in Bielewicz’s post so take a look at it to get the full story. My advice is to specify a directory to hold backups and let Emacs figure out the rest for you. Still, if you want to tinker with the defaults, Bielewicz’s post has all the details you need.