I have the following code snippet that takes backup of my production database every night -
use My_database go checkpoint go use [My_database] go DBCC SHRINKFILE (N'my_db_log', 500) go backup database My_database to disk = 'W:\...\My_database._dmp1.bak' , disk = 'W:\...\My_database._dmp2.bak' ... ... ... , disk = 'W:\...\My_database._dmp30.bak' with stats = 10 go
When I'd tried restoring the database to a test server I identified the backup was regressed to a historical date, as identified from different application related tables. This was not in sync with the date backup had been actually generated.
I am actually a Java / Java EE developer and not very versatile with SQL Server, any help in this area will be much appreciated. This database runs SQL Server 2008R2.
There was no latency, manually the files were copied 5 files at a time, was complete in 30-45 minutes. The command used for restoration was:
RESTORE DATABASE [MY_TESTDB] FROM DISK = N'W:\...\My_database._dmp1.bak', DISK = N'W:\...\My_database._dmp2.bak', ... ... ..., DISK = N'W:\...\My_database._dmp30.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO
Also this backup had run last time on 23 Oct 2015 but the restored test DB got updated only till 31 Jul 2015.
There was only one backup in each backup device. I would hardly believe there had been a problem with restoration, as it was refreshed to multiple databases by others with DBA knowledge, but result was always 31 Jul 2015.