Sql-server – Restore databases from prod to test server with data over X days

log-shippingreplicationrestoresql serversql-server-2005

We've got a list from app owners to restore say 20 databases from a total of 100 available production server databases onto a test server on weekly basis.

Moreover, they require it in a way that backup that would be occurring should contain data of last 60-90 days for all the above 20 databases.

I am not sure if that can be achieved. If yes, kindly give suggestions how can I go around this to automate the backups as said above.

For automating the restore process, should I go with Log Shipping or Transactional replication? We have space issues on test and the client does not want to invest much!

Best Answer

As already suggested, you cannot achieve this using backup/restore. You can also not achieve it using log shipping.

I would look at using transactional replication perhaps from views, which would define the 60 to 90 day window.

Be aware (or make your stakeholders aware) that replication is not free and comes with its own (usually small) performance overhead.