How to restore only the files attached to LiteSpeed backup files?
The SQL LiteSpeed Attached Files Feature is a feature that allows you to attach a file or set of files to a backup. The attached file(s) get appended to the data section of the backup in the backup file using a VDI-like interface that plugs into the LiteSpeed Engine. Therefore, the attached files are encrypted and compressed, with all pertinent backup parameters supported, just as with the database backup.
This feature works for disk, tape, TSM, and Double-Click Restore (backup embedded in the SQLLiteSpeed.exe) as well.
RESOLUTION:
In order to restore the attached files with the database, the @attachedfile parameter must be included in the restore script.
Example:
exec master.dbo.xp_restore_database @database = 'Northwind', @filename = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\Northwind200610240753LiteSpeed_Full.BKP', @encryptionkey = 'a', @filenumber = 1, @with = 'RECOVERY', @with = 'NOUNLOAD', @with = 'STATS = 10', @attachedfile='C:\Program Files\Microsoft Office\CLIPART\Publisher\Backgrounds\J0143743.GIF'
The attached files may be restored without the database by substituting xp_restore_database with xp_restore_attachedfilesonly.
Example:
exec master.dbo.xp_restore_attachedfilesonly @filename = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\Northwind200610240753LiteSpeed_Full.BKP', @encryptionkey = 'password', @filenumber = 1, @attachedfile='C:\Program Files\Microsoft Office\CLIPART\Publisher\Backgrounds\J0143743.GIF'
Note -- other issues currently open in Development for attached files on Double Click.exe files (in Version 5.0.2)
Restoring by just clicking on double click file restored the database but not the folders or files (if the folder does NOT already exist).
Restoring via command line with MOVE on the attached file fails.
Only sqllitespeed.exe will start the call in command line 'filename'.exe will not. This would require that LiteSpeed be installed on the destination server, but it does not need to be licensed.