How do you stripe a LiteSpeed backup and restore via script?
When backing up within the GUI under the 'Backup Wizard', just add additional location and filenames under the 'Select Backup Destination'.
When restoring within the GUI under the 'Restore Wizard', just add additional location and filenames under the 'Select Backup Files'.
-- Here's an example using scripts:
EXEC master.dbo.xp_backup_database
@database = 'pubs'
, @filename = 'C:mssqlstripingfile1.bak'
, @filename = 'C:mssqlstripingfile2.bak'
, @filename = 'C:mssqlstripingfile3.bak'
, @desc = 'FULL BACKUP TEST'
, @init =1
go
EXEC master.dbo.xp_restore_database
@database = 'pubs'
, @filename = 'C:mssqlstripingfile1.bak'
, @filename = 'C:mssqlstripingfile2.bak'
, @filename = 'C:mssqlstripingfile3.bak'
, @with = 'RECOVERY'
go
-- Here's an sample script If you will restore the file to another database:
exec master.dbo.xp_restore_database @database = N'pubs2' ,
, @filename = 'C:mssqlstriping file1.bak'
, @filename = 'C:mssqlstriping file2.bak'
, @filename = 'C:mssqlstriping file3.bak'
, @with = N'REPLACE',
, @with = N'MOVE N''pubs2'' TO N''C:Program FilesMicrosoft SQL ServerMSSQLdatapubs2.mdf''',
, @with = N'MOVE N''pubs2_log'' TO N''C:Program FilesMicrosoft SQL ServerMSSQLdatapubs2_log.ldf''',
, @with = 'RECOVERY'
There are also details in the LiteSpeed for SQL Server Help file.
If you wish to add more files, just append additional filenames to both the backup and restore command:
, @filename = 'C:mssqlstripingfile(n).bak'
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center