I used to do something like this to make sure I wasn't running an operation on live.
Not sure if it'd work for restore (does it have to be the only statement in a batch?)
IF @@SERVERNAME = 'Live Server'
BEGIN
PRINT 'You''re on the Live Server!'
END
ELSE
BEGIN
RESTORE DATABASE...
END