Overwriting a project

Can I make Audacity overwrite a project with the same name?
For a backup I tried saving in another directory, then switch
back, save in documents and then when writing the backup
directory again it can not overwrite.

No, this is not currently possible, as it says in the 2.1.2 Release Notes.

To backup, do File > Save Project As… and use the same project name with the date and time appended (or version 1, version 2, backup or whatever helps you identify what you have saved).