I Copied some database backups from one server to another server(new instance no databases are present).I tried restoring using below command
Restore database dbname from disk='g:\e2bak\dbname.bak' with stats=10
It failed with below error
Directory lookup for the file "G:\MSSQL$s73g\MDF\dbname.mdf" failed with the operating system error 3(The system cannot find the path specified.)Msg 3156, Level 16, State 3, Line 1
Also server level default database settings are to store data and log in
I can overcome the error by specfying move option. But my confusion here is
1.Why database .bak file is looking for G:\MSSQL$s73g\MDF\dbname.mdf",this is the path of dbname database files in production from where we copied the .bak file 2.Also when I restored the database with move option and took a backup in same server, I was able to restore the Database with below command Restore database dbname from disk='G:\e1ebk\dbname.bak' with replace,stats=10
Can you please help me understand why .Bak file location is pointing out to some other directory(which doesn't even exist in our server and existed only on production server) and in second case why this worked without move option.