Skip to content
David Wiseman edited this page Jun 10, 2024 · 4 revisions

How do I pause log shipping?

Stop the service. e.g.

net stop LogShippingService

Why does the service take a long time to shutdown?

The service will do a graceful shutdown allowing any in progress restore operations to complete. You can use tools like sp_WhoIsActive or sp_BlitzWho to check for restore operations that are still running.

Can I use this with S3 buckets instead of Azure blob?

Yes. This feature was added in version 1.5 of this tool. Backup/Restore to S3 was introduced in SQL Server 2022. If you are on an older version of SQL Server, consider using a File Gateway.

How many databases can it support?

There is no hard limit on the number of databases. The tool has been used with around 5K databases in a production environment. You can adjust the thread count based on your hardware and number of databases as required. You might have other challenges with such a large number of databases. Anything that executes per database single threaded is going to be slow. MSDB history tables will grow large & it's important you have cleanup jobs to manage retention.

Can I use this as a tool to restore my databases?

Yes! See the Initialization options. If you are using the tool for a one off restore you can run it as a console application rather than installing as a service. You can even configure STOPAT for point in time restores. LogShippingService.exe --StopAt "2024-03-27 13:56:01".

The tool will leave databases in a RESTORING or STANDBY state. To recover your databases run RESTORE [{DatabaseName}] WITH RECOVERY. This will bring your databases online and will prevent additional log restores.

If you are migrating to a new SQL instance or performing a failover, you would typically take a tail log backup on the source SQL instance. This takes the database offline and ensures no further transactions are possible. This ensures you have all the data and allows you to restore logs back in the other direction. The query provided in the Monitoring & Troubleshooting section will print the RESTORE [{DatabaseName}] WITH RECOVERY command if the last log restored is a tail log backup.

What if my backups might be in multiple paths? e.g. Depending on which node is primary in an availability group.

A comma separated list of paths can be supplied to FullFilePath & DiffFilePath & LogFilePath.

Clone this wiki locally