There are 3 different folders which store respectively full, differential, and log backups. Different types of backups occur in different schedules. Now I need to create a new job which will periodically restore the database in order to assure the consistency of the backups. There are some third party tools available but I do not want to use them. Now, I can't figure out how to specify in the Job Step script to choose the last full/dif/log backups from their folders? The thing is there are multiple files already in the folders.
How to Create SQL Agent Job to Automatically Restore Database from Latest Backups
backupjobsrestoresql server
Related Question
- How to Properly Restore Database from File Groups Backups
- Sql-server – SQL Server restore full backup + partial differential backups
- Sql-server – SQL Server High Availability restore copy_only backups from secondary replica problem
- Sql-server – Full backup on failure
- Sql-server – Incremental Backups In SQL server
- SQL Server Restore – Automating DB Restore from Network Share
- Sql-server – How to choose which backup files to restore when identical timestamps exist for diff and log backups
- SQL Server – Optimizing Storage with .bak and .dif Files
Best Answer
Solution to the problem is described: https://www.mssqltips.com/sqlservertip/1584/auto-generate-sql-server-restore-script-from-backup-files-in-a-directory/