Automate Restore of Databae Backups - Full and Log - Backup pro 10
jigar_patel
Posts: 1 New member
in SQL Backup
I'm received weekly full backup and hourly log backup files. is there a easy way to restore hourly log backups and weekly full backups. or it has to be scheduled separately? I'm restoring backups to SQL Server 2022
Tagged:
Answers
For the hourly log backups, look into the RESTORE LOG command in SQL Backup. It allows you to specify a search pattern for the transaction log backup files, which it will then restore automatically for you in sequential order, then move the files to a different folder so that it will not be restored again.
So it's one T-SQL job that may look something like this:
For the weekly full backup, look into using the LATEST_FULL option. This instructs SQL Backup to look for and restore the latest full backup file(s) in a given folder. It's a T-SQL job that may look something like this: