Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup weekly auto backup in SQL Server 2012?

Please advice how can i setup automated database backup in my SQL Server 2012.

I need to take all databases (currently it contains only 3 ) in SQL server an automated weekly backup which runs on Every Friday at 0100 h (1 AM). These back up files (*.bak) should be placed in E:\Backups folder.

like image 837
Shafraz Khahir Avatar asked Sep 16 '14 04:09

Shafraz Khahir


People also ask

How do I automate backup and restore in SQL Server?

To get started, copy the following PowerShell into the editor of your choice and configuring the variables for your purposes. To obtain the logical and physical file names for the source and target databases: From Object Explorer in SQL Server Management Studio: Right click on source database.


2 Answers

In Microsoft SQL Server Management Studio, open the Object Explorer and then:

  1. Right-clic on Management > Maintenance Plans
  2. Clic on New Maintenance Plan...
  3. Give a name to your plan
  4. Create as many subplans as you need for your strategy
  5. Select a subplan and drag'n'drop the appropriate tasks from the Toolbox panel
  6. To backup a database, the appropriate task is Back Up Database Task

For the configuration of the backup schedule, you just need to follow the wizard and define what you want. If you need more information, i suggest you to go on the official website of Microsoft: Create a Full Database Backup

Hope this will help you

like image 107
Joël Salamin Avatar answered Oct 13 '22 18:10

Joël Salamin


Check this opensource backup windows service MFSQLBackupService, it did a great job for me.

like image 30
peter bence Avatar answered Oct 13 '22 18:10

peter bence