The night train from Tbilisi to Baku reaches the border around 2 hours after leaving Tbilisi.
Then, the police gets in and collects everyone's passport. Your bag will be searched for any item related to Armenia (Book, flag, clothes, tickets, etc) and you'll be asked if you ever went to Armenia.
If you're neither Georgian or Azerbaijani you'll be taken to an empty compartment for the formalities (taking your pictures, giving you back your passport and possibly asking you one or two questions).
Azerbaijan and Armenia are in conflict over the Nagorno-Karabakh territory and the relations between the two countries are very tense.
Gobustan geographical region is situated in the west-south of Baku. The meaning of the word «Gobustan» is derived from two words «gobu» -«ravine» and «stan»-«place», i.e. ravine area. Azerbaijan keeps the first place in the world for the number of Mud Volcanoes. About 350 of the 800 Mud Volcanoes of the World are to be found in Azerbaija