简体   繁体   中英

sql server tlogs backup

my scenario is that i had log shipping configured between two sql servers and because of an issue the restore stopped few days back.

Since the retention period has already expired and the purge job has already deleted the logs from the primary server I cannot patch the logs to dr to synch it with the primary server.

My question is how can I backup tlogs from the primary sql server for a specific duration. For example from the time of failure lets call it (15 October) till the current time (17 october 10 pm) manually .

I dont want to take a differential backup or a full backup and restore it to the secondary server as that would require me to delete the log shipping configuration and re do it .

Unfortunately, you're going to have to pull another full backup of the database and start over for the secondary.

You can probably disable the log shipping jobs, run a full backup, restore with norecovery, and re-enable the log shipping jobs. I've done that with Red Gate SQL Backup. Full backups don't break the restore log chain.

Using a differential doesn't mean you will break log shipping. Here is a great article about basically doing the following:

  1. Disable the Restore jobs on the Secondary server.
  2. Perform a differential backup on the Primary database.
  3. Restore that differential on the Secondary database and choose to keep it in NORECOVERY mode.
  4. Re-enable the Restore jobs on the Secondary server.

The Restore job should then be smart enough to find any applicable logs that can be applied to the updated database. Your Log Shipping setup should be back to normal now and run as expected.

Please let me know how it goes. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM