backup-file-name-p

backup-file-name-p is a compiled Lisp function in `files.el'.

(backup-file-name-p FILE)

Return non-nil if FILE is a backup file name (numeric or not).
This is a separate function so you can redefine it for customization.
You may need to redefine `file-name-sans-versions' as well.