It really depends on the type of back surgery. Something such as a discectomy might be about 2 months and no specific rehab is needed. A fusion may take 3-4 months. There are also several factors influencing the healing time such as severity of injury, general health, medications, etc.
It is important to realize that although you might be feeling great after 1-2 months, the body will continue tissue remodeling for several months and it is important to take it easy to rest and recover. Activity should be added gradually.