nail (something) back
To affix something with nails in its original, correct position. A noun or pronoun can be used between "nail" and "back"; typically followed by another preposition to specify where or how it is being affixed. When will you finally get around to nailing these loose floorboards back into place? The hurricane ripped the shingles off our roof. It will take a week to nail them back on!
nail something back
to secure something back out of the way by nailing it. Please nail the shutters back so they won't bang against the house. I'll nail back the shutters.