On the blade is a famous couplet from the Gulistan of Sa'di:
غرض نقشیست کز ما باز ماند
که هستی را نمی بینم بقایی
"The aim of this design is that it should outlive us,
For I see no permanence in this existence"
Down the back of the grip is Surat al-Ikhlas (112)
In the cartouche at the back of the base of the blade I would suggest the following
فرمایش سردار شیر علی خان
"Commission of Sardar Sher 'Ali Khan"
The date and name of the maker I read as you have done
سنه ۱۲۷۲
"Year 1272 (1854-5)"
عمل احمد الله صوفی
"Work of Ahmadullah Sufi"
The names strongly suggest the owner and maker were from Afghanistan. There was a member of the Barakzai dynasty called Sardar Sher 'Ali Khan who was vizier to the governor in Herat and later governor himself of Kandahar. His dates fit too
https://www.royalark.net/Afghanistan/barak5.htm