{"id":22973,"date":"2018-08-02T19:31:22","date_gmt":"2018-08-02T15:31:22","guid":{"rendered":"http:\/\/www.msp360.com\/blog\/?p=22973"},"modified":"2023-10-31T16:02:33","modified_gmt":"2023-10-31T12:02:33","slug":"sql-server-2008-backup-guide","status":"publish","type":"post","link":"https:\/\/www.msp360.com\/resources\/blog\/sql-server-2008-backup-guide\/","title":{"rendered":"SQL Server 2008 Backup Guide"},"content":{"rendered":"<p>Microsoft SQL Server 2008 is still one of the most popular corporate database engines, and it has a lot of backup types supported. Let\u2019s briefly remember all of these backup types and find out how to perform the most useful ones.\u00a0After reading this post, you will know how to backup a database in SQL Server 2008 using query language or SQL Server Management Studio GUI.<!--more--><\/p>\n<div class=\"table-of-content \">\n\t\t\t\t<p>Table of Contents<\/p>\n\t\t\t\t<ul><\/ul>\n\t\t\t\t<\/div>\n<h2>Backup Types Overview<\/h2>\n<p>Microsoft SQL Server has five backup types supported: full and differential, transaction- and tail-logs backup, and copy backup. But the last two ones are quite specific, so we will shortlist three of them:<\/p>\n<ul>\n<li>Full backup contains all database data on the moment the backup has finished, so it doesn\u2019t allow point-in-time restoration. After a successful full backup runs, transaction logs are truncated.<\/li>\n<li><a href=\"https:\/\/www.msp360.com\/resources\/guides\/sql-server-backup-and-restore\/differential-backup\/\">SQL Server differential backup<\/a> is based on the most recent full data backup and contains only the data changed since the last full run. It requires less time to perform the back up.<\/li>\n<li><a href=\"https:\/\/www.msp360.com\/resources\/blog\/sql-server-transaction-log-backup\/\">Transaction logs (T-Logs) backup<\/a>\u00a0contains every transaction made in SQL Server since the last full or differential backup. Using log backups allows you to create a database backup every hour or even minute - that is important for core business databases.<\/li>\n<\/ul>\n<p>Please remember that SQL Server 2008 backup and recovery scenarios available are restricted by the database recovery model selected: it controls transaction logs management. There are generally three recovery models: Simple, Full, and Bulk-Logged. If choosing to create a T-Logs backup, you should set the Full recovery model for the given database.<\/p>\n<div class=\"call-to-action\">\n<div class=\"call-to-action__left\">\n<div class=\"call-to-action__tag\">FREE WHITEPAPER<\/div>\n<div class=\"call-to-action__title\">SQL Server Backup and Recovery<\/div>\n<div class=\"call-to-action__text\">Check out the ultimate guide with best practices for MSPs:<\/div>\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper hs-cta-deferred\" id=\"hs-cta-wrapper-9ed03d9c-f81b-4305-917a-03488ba39bf3\" data-portal=\"5442029\" data-id=\"9ed03d9c-f81b-4305-917a-03488ba39bf3\"><span class=\"hs-cta-node hs-cta-9ed03d9c-f81b-4305-917a-03488ba39bf3\" id=\"hs-cta-9ed03d9c-f81b-4305-917a-03488ba39bf3\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/5442029\/9ed03d9c-f81b-4305-917a-03488ba39bf3\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-9ed03d9c-f81b-4305-917a-03488ba39bf3\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/5442029\/9ed03d9c-f81b-4305-917a-03488ba39bf3.png\" alt=\"CTA\"><\/a><\/span><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div>\n<div class=\"call-to-action__right\"><img decoding=\"async\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2019\/07\/The-Ultimate-MSP-Guide-to-MS-SQL-Server-Backup-and-Recovery.png;\" alt=\"WP icon\" \/><\/div>\n<\/div>\n<p>Now let\u2019s take a look at how to perform such backup types.<\/p>\n<h2><a name=\"how\"><\/a>How to Perform Full and Differential Backup of a Database in SQL Server 2008<\/h2>\n<h3>Using Query<\/h3>\n<p>Easiest way to perform any backup in Microsoft SQL Server is using query language. You should right-click root view in the navigation tree of SQL Server Management Studio, and select New Query. Then paste a script and click Execute on the toolbar.<\/p>\n<p>Here is the script to create a full database backup:<\/p>\n<pre>USE TestDB; \u00a0\r\nGO\r\nBACKUP DATABASE TestDB\r\nTO full_backups\r\n WITH COMPRESSION, \r\n DESCRIPTION = 'Sample full backup', \r\n NAME = 'Set of FULL backups';\r\n GO\r\n<\/pre>\n<p>You may notice full_backups as a backup target. It is a logical \u201cbackup device\u201d representing a particular file on the HDD. You need to create one or more \u201cdevices\u201d for any backup type described below. Use this command to create one:<\/p>\n<pre>BACKUP DATABASE TestDB \u00a0\r\n \u00a0\u00a0TO diff_backups \u00a0\r\n \u00a0\u00a0WITH DIFFERENTIAL; \u00a0\r\nGO<\/pre>\n<p>Add DIFFERENTIAL as an option next to the WITH operator if need to create a SQL Server 2008 differential backup.<\/p>\n<h3>Using SQL Server Management Studio<\/h3>\n<p>If you prefer GUI, then open SQL Server Management studio, navigate to the target database and choose Tasks - Back Up\u2026 in the context menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22975\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1.png\" alt=\"SQL Management Studio 2008 Backup\" width=\"684\" height=\"490\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1.png 684w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-300x215.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image1-624x447.png 624w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/p>\n<p>In the Back Up database screen, choose Full as a backup type and click Add at the screen bottom to add a backup device:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22976\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3-1024x613.png\" alt=\"Full SQL 2008 Backup Through Management Studio\" width=\"625\" height=\"374\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3-1024x613.png 1024w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3-300x180.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3-768x460.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3-624x374.png 624w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image3.png 1057w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>If you need to create a SQL Server 2008 differential backup - use Differential in the same drop-down menu. We suggest to use separate backup devices for every backup type. It allows you to manage backup storage more efficiently and simplifies navigation over the set of files.<\/p>\n<p>After the backup job is completed, you can find resulting data in the Media Contents section of the particular backup device\u2019s context menu.<\/p>\n<div class=\"perfect-pullquote vcard pullquote-align-full pullquote-border-placement-left\"><blockquote><p>Note: you can also automate such tasks using the SQL Server Agent feature - it allows you to create a repetitive task using a backup job dialog or query script\u00a0<\/p><\/blockquote><\/div>\n<p>To learn more about SQL Server backup automation, check out this article:<\/p>\n<p><span class=\"further-reading \">Further reading<\/span> <a href=\"https:\/\/www.msp360.com\/resources\/\/blog\/sql-server-backup-automation\/\">SQL Server Automatic Backup<\/a><\/p>\n<h2>Transaction Logs Backup in SQL Server 2008<\/h2>\n<p>Before creating the first T-Logs backup, please check if your target database uses the Full Recovery model. Otherwise, your backups can not be consistent since the SQL engine will keep only a few log files at once by automatically deleting the oldest ones.<\/p>\n<p>Perform transaction logs backup using the query script below:<\/p>\n<pre>BACKUP LOG TestDB \u00a0\r\n \u00a0\u00a0TO logs_backups; \u00a0\r\nGO<\/pre>\n<p>You can achieve the same using GUI by selecting Transaction Log type in the drop-down menu of the backup dialog seen above:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22977\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image2.png\" alt=\"How to take transaction log backup on SQL 2008\" width=\"912\" height=\"666\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image2.png 912w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image2-300x219.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image2-768x561.png 768w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2018\/08\/image2-624x456.png 624w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/p>\n<p>Do not forget to add a separate backup device for the T-Logs backup type.<\/p>\n<h2>Summary<\/h2>\n<p>Microsoft SQL Server has a flexible backup model, allowing you to keep the balance of time spent to backup and speed of data recovery. In most cases you should create a full backup weekly with a set of daily differential backups. If your company needs a better <a href=\"https:\/\/www.msp360.com\/resources\/blog\/rto-vs-rpo-difference\/\">RTO\/RPO<\/a>, consider using T-Logs backup as well.<\/p>\n<p>However, if you don\u2019t want to have to write scripts manually or learn T-SQL, check\u00a0<a href=\"https:\/\/www.msp360.com\/backup\/\">MSP360 Backup for MS SQL Server<\/a>. MSP360 Backup allows you to schedule recurring backups of all the types described above to local or cloud storage of your choice, without requiring scripting or extensive customization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft SQL Server 2008 is still one of the most popular corporate database engines, and it has a lot of backup types supported. Let\u2019s briefly remember all of these backup types and find out how to perform the most useful ones.\u00a0After reading this post, you will know how to backup a database in SQL Server [&hellip;]<\/p>\n","protected":false},"author":46,"featured_media":24615,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[883,877],"tags":[],"class_list":["post-22973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup-and-dr-articles","category-blog-articles"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/22973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/comments?post=22973"}],"version-history":[{"count":4,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/22973\/revisions"}],"predecessor-version":[{"id":56455,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/22973\/revisions\/56455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media\/24615"}],"wp:attachment":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media?parent=22973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/categories?post=22973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/tags?post=22973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}