How to Schedule SQL Server Database Backups.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there in this video I'm gonna show you how to backup your a sequel server a database on a schedule okay so I have sequel server management studio open here and the first I'm going to do is I want to come down to my sequel server agent and I'm going to start this agent okay so we should hopefully see this beginning to start here and now so now that that's started what I like to do next when I'm doing this on a new server is to go to our services so we can see we have the sequel server agent here and it's set to manual so I right-click the sequel server agent click properties and I train sister start automatically basically this means if you reboot your server your sequel server an agent job will start um boot and your backup jobs will still run so now that I'm happy with that I want to click apply and I'm gonna click OK okay let me minimize this here okay so in my databases I have dis Northwind database that I want to backup on schedule so what I'm gonna do is I'm gonna come down to management and just expand expand the menu here and I am going to go to maintenance plans and I want to right click and I'm gonna select maintenance plan wizard perfect so I'm gonna click Next here I'm gonna call this back-up plan okay and I want to leave it to run as a sequel server age and account and I'm gonna click change here and I going to change sister daily and I'm going to say let's run this at 9 o'clock every night with no end date and we'll click OK on this ok perfect let's click Next here and we're going to click to back up to database full so take a full copy of the database nightly let's click Next we'll click Next again okay so we have a few options here so first things first let's select the database that we want to back up so I'm gonna take Northman and I want to click okay perfect so let's go to our destination part now and I'm going to move this from the default into a folder which I created called sequel backups if you're doing this on a server you can back it up to another disk or you can arrange to back it up to your C Drive and then have a script that moves it elsewhere it later so for the time being I'm going to back this up to the sequel backups folder as I've created perfect I'm gonna leave it as a duck back and let's just check our options here and we'll just leave it all as is and we'll click Next and we're gonna write a report txt file so let's just put that report in with our sequel backups as well and we'll click Next and then we'll click finish okay so this looks like it's going to work for us here so I might just pause the video while we're waiting okay we're back and we can see the others run successfully for us let's click close here so I open my maintenance plan I can see I have a back-up plan so let me just execute this now okay so this is executing and why it's doing that I'll just pause the video again okay we can see this is run successfully so I click close here perfect and I can see my backup file has been praised so that will run every night at 9 o'clock and backup your database now what I usually do now is I create another maintenance plan so we'll do that now so I go in and I want to click new maintenance plan wizard I'll click Next and we're going to call this clean up to clean off those old dot back files so let's change this to be on a schedule so we'll say nightly again and let's run this at 10 o'clock so an hour after our backup job was run so I'm gonna click OK and we'll click Next here now we're going to select maintenance cleanup tasks okay and then next next again okay so what we want to do we want to delete backup files that's perfect so let's go into that folder that we made earlier the sequel backups one perfect and we're going to leave now it's very important that you don't put the dot you just put in back so we're gonna look in that folder for any old back file and delete it and I just want one week of backups to have so I can go back one week if there's an issue with the database so I'm going to click Next and you know what will pop the report in here as well just to keep it all together and then click Next and then click finish okay so we can see this is done so we now have our two plans we have a back-up plan which will back up the database nightly at nine o'clock to file and then we have a cleanup plan that will run every night and delete any database that is older than one week if you encounter any issues were following this tutorial be sure to comment below and if I can help I certainly will thanks for watching
Info
Channel: Darren's Tech Tutorials
Views: 39,825
Rating: 4.953917 out of 5
Keywords: SQL, SQL Server, how-to, Tutorial, databases, How to Schedule SQL Server Database Backups., sql tutorial for beginners, sql tutorial, sql server, sql server management studio, SQL Server Database Backup, sql server database backup and restore, sql server database backup strategy, Schedule SQL Server Database Backups., microsoft sql server (software), sql server tutorial, sql server tutorial for beginners, sql server tutorial for beginners with examples, sql server database backup
Id: MKz4Cq5cj-c
Channel Id: undefined
Length: 5min 35sec (335 seconds)
Published: Wed Sep 20 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.