SQL Server Compressed Backup

Documentation

Getting Started Examples

Below are some examples to get you started using msbp.exe on the command line. msbp.exe must run on the same machine as SQL Server, due to how SQL Server dumps the data to msbp.exe.

Basic Backup

To backup to a standard SQL Server *.bak file, run the following command:

msbp.exe backup "db(database=model)" "local(path=c:\model.bak)"

Basic Restore

To restore from a standard SQL Server *.bak file, run the following command:

msbp.exe restore "local(path=c:\model.bak)" "db(database=model)"

Compressed Backup

Using the basic command above, you can add any number of plugins between the source and destination. For example, you may want to compress the data with the gzip plugin:

msbp.exe backup "db(database=model)" "gzip()" "local(path=c:\model.bak.gz)"

Compressed Restore

And to restore compressed the file, insert "gzip()" in the middle again. Here the gzip plugin knows it is restoring the database, so it will uncompress the data:

msbp.exe restore "local(path=c:\model.bak.gz)" "gzip()" "db(database=model)"

Multithreaded Compressed Backup

Using the compression command above, you can add any number of files. Since each file runs on its own thread, you can acheive multithreaded compression. For example:

msbp.exe backup "db(database=model)" "gzip()" "local(path=c:\model1.bak.gz;path=c:\model2.bak.gz;)"