This is a no-brainer: the sentry. Allow me to explain myself.
First of all, if you're playing red on badlands and you're the only engineer, something is wrong.
Secondly, and much more importantly, a sentry is only useful as long as it's surprising. In other words, when the whole opposing team knows where your gun is, you won't have a gun there for very much longer. Generally, when a spy saps, or attempts to sap, your buildings, you know that your gun is now public knowledge, and it's going to come under increasing fire until it's gone.
In this scenario, you have two choices. You can rebuild where you were, which is generally easy to do, as you have at least one thing up from before, or you can scrap your old setup and build somewhere else. Let's look at these two things separately.
Let's say you've decided to stick around. Nine times out of ten, you'll still pick the sentry, and that one other time, you'll take the teleporter. Here's the logic: In order to pick the teleporter, you need a team that you KNOW will stick around to support you while you rebuild, and a number of times, that just isn't the case. If you can't count on someone to stay with you and protect you from the bad guys, then you're better with the sentry. You have to consider the setting here as well: there is a pack of 100 metal on the roof, and you'll have the detritus of your old buildings to use as well. You can immediately put up a dispenser in 15 seconds, whereas a sentry would take a minimum of 30 seconds if you had infinite metal to get to level 3. Now, 15 seconds won't get a dispenser to level 3, but you don't need it at level 3. you need it to sit and build up metal, which it does at the same rate no matter what level it is. Bottom line if you have an uncooperative team: keep the sentry, because of the abundance of metal on the roof and the speed with which you can reset a dispenser and teleporter.
Now, the smarter thing to do here is to rebuild elsewhere, because they know where you are. In this case you keep the gun. It takes the opposing team MUCH more effort to kill a sentry than to kill dispensers or teleporters. You should occupy yourself setting up your new embankment, out of sight, while the enemy deals with your sentry. They may kill it immediately, but you may well kill some extra people, and it'll serve as a great indicator of when the enemy has, in fact, taken the roof. Leaving sentries lying around is also a great distraction. Aside from it being a threat, it indicates to the other team that you're still there, and they still need to divert significantly more resources to killing it than they need to. Often, I'll have a dispenser and a teleporter set up somewhere other than my gun, and I'll patrol the area, killing with my shotgun, until someone kills my risky sentry. once they do, I immediately set up a new one with my new nest. It's seamless, efficient, and allows to you cover more area. It also keeps the opponent guessing, which is necessary if it's an organized team, and if they are playing as individuals and NOT as a team, then it'll get you a lot more kills, and still act as a psychological deterrent.
Bottom line: Sentry. Always, and ESPECIALLY because there's enough metal around to make dispenser setup automatic. The last thing to save in all cases, as far as I'm concerned, is the dispenser.