Search code examples
sql-serverdatabase-backups

Restoring only one file from a backup set


I have a job which takes backups but rather than making a new file each time, it appends to the existing file.

When I use RESTORE HEADERONLY FROM <backup_device> I get three records as output which is exactly what I expect. Now I am having trouble in restoring one file from the backup set.

Any idea how we can do this?


Solution

  • BACKUP DATABASE [...] TO DISK = N'new backup name' WITH INIT

    or check script for Automated Database Backups in this post