Backup HA SQL 2014 Database and logs to local disk

David Tolo
David Tolo used Ask the Experts™
on
Hello,
The title says it all :-)  I need to back up an ha sql server 2014 db and logs to a local disk on a daily basis.

I am not an sql expert so clear directions are helpful.

Thank You
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Brian CroweDatabase Administrator
Top Expert 2005

Commented:
A little background info...apologies in advance for the wall of text

There are essentially 2 different recovery models for SQL Server (There is a third BULK-LOGGED but it is generally not used except for short periods of time), SIMPLE and FULL.  With FULL recovery every transaction is logged to the log file (*.ldf) and stays there until either a full or transaction backup is run.  With SIMPLE recovery the transaction is logged to the log file but as soon as it is committed to the database that space is freed up so the log file never really gets very big and no transaction log backup is necessary or even possible.

The primary reason to opt for FULL over SIMPLE is if you need a more granular restore option.  Typically with a database in FULL recovery you would perform a full backup say once a week, a differential backup daily, and transaction log backups every 15-60 minutes (depending on how active your database is).  This would allow you to restore the database to any transaction log backup in the last week or even longer depending on how much history you want to keep.

The reason I dropped all this on you is that if you only need daily backups of your database then you should probably be in SIMPLE recovery model and a transaction log backup is no longer necessary.  Just set up a weekly full backup and daily differentials.

To answer your question more directly, below is a link to a video tutorial on how to set up a maintenance plan.

https://www.youtube.com/watch?v=oLnZttZWWtk
Vitor MontalvãoIT Engineer
Distinguished Expert 2017

Commented:
The title says it all
I think that is a very generic title and you may have different answers.

So, please clarify the following:
1 - What is your HA solution/configuration? It's a Clustered Instance? Are you using AlwaysOn?
2 - What is your RTO and RPO?
3 - Which SQL Server Edition that you're using?
4 - Which backup solution are you're using?

Author

Commented:
It is ha cluster
what is RTO and RPO?
2014
I want backup to local disk on either or both of the hypervsiors hosting the vms that are cluster.  Right now the logs and database reside on an iscsi disk that both cluster nodes have access to.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Vitor MontalvãoIT Engineer
Distinguished Expert 2017

Commented:
RPO = Recovery Point Objective - When a crash happens what quantity of data is allowed to be lost (none, last minute, last hour, last day, ...)?
RTO - Recovery Time Objective  - How much time is allowed for the service to be unavailable when a crash happens, i.e. how much time do you have to recover a service after a crash?

With Edition I'm asking if is Standard Edition or Enterprise Edition? In Enterprise Edition you have more features that can be helpful here.

So, you're not using  a 3rd party backup system. Only the SQL Server native backup, right?

Author

Commented:
I believe I can have no loss as it support our production vmm and wap.

RPO = I think if I recover within a day it should be fine.
RTO= an hour

Enterprise
no third party
IT Engineer
Distinguished Expert 2017
Commented:
RTO= an hour
Then you should have your database with Full Recover Mode (I think you already have) and schedule hourly transaction log backups, so at maximum you'll lose only the last hour of work. Depending on the type of crash you might even recover everything with a tail backup.
If the database is very large then I suggest you to perform a weekly full backup and a daily differential. If it's a small database a daily full backup will be enough.

If you want a more professional solution don't use the SQL Server Maintenance Plan to perform the backups. Ola Hallegren has a very good solution based on SQL Scripts only and it's used in large companies around the world. Here's the link to his backup solution. Download the script and change the values to fit your environment and then run it. Go to SQL Server Agent and check for the created jobs and check for their schedules.

Author

Commented:
Thank You!
Brian CroweDatabase Administrator
Top Expert 2005

Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial