Is there a corresponding functionality with LiteSpeed for the following T-SQL commands?
backup database dbname to disk = 'NUL'
backup log dbname to disk = 'NUL'
The native T-SQL backup commands offer the ability to direct backups to " disk = 'NUL'. When this is done, no writing of the backup takes place. The backups are directed to the bit bucket (or device /dev/null in UNIX systems). The process finishes much more quickly than it would if the backup was actually being written to disk. This is extremely useful when there is a need to quickly free space within an out of control log file, or when working with staging systems that will never need to be restored to the current point in time.
There is a @NoWrite parameter which can be set to "1" and therefore the backup is not actually being written to the hard disk. A filename is still required but the file will not be created and no IO is performed. In all other respects, LiteSpeed behaves normally. If compression/encryption is specified then the data will get compressed/encrypted before getting thrown away. As far as SQL Server is concerned, the backup is completed and the MSDB history tables are updated with the filename specified (that is not created). All database related processing is still performed. See example below.
There is no @NoWrite parameter for xp_backup_log. The @with = 'TRUNCATE_ONLY' option can be used. The option 'TRUNCATE_ONLY' will not backup any log. The purpose is to only truncate the inactive part of the log without making a backup copy. The function is the same using LiteSpeed GUI or native SQL Server tools. The command will still work with SQL Server 2000 or 2005 but is deprecated in SQL Server 2008.
The --NoWrite parameter is also available from the command line. This has to be run from Command Prompt in the C:\Program Files\Quest Software\LiteSpeed\SQL Server\Engine directory. See examples below.
sqllitespeed -B database --nowrite -D AdventureWorks -F C:\AW_backup.bak
sqllitespeed -B log --nowrite -D AdventureWorks -F C:\AW_log_backup.bak
Enhancement request ST66175 has been submitted to Development for consideration in a future release of LiteSpeed for SQL Server.