{"id":2664,"date":"2015-10-28T04:52:39","date_gmt":"2015-10-28T08:52:39","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=2664"},"modified":"2015-11-23T04:04:27","modified_gmt":"2015-11-23T09:04:27","slug":"full-backup","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/full-backup\/","title":{"rendered":"Full Backup"},"content":{"rendered":"

The simplest kind of SQL Server backup is a full database backup. It provides a complete copy of the database but allows restoring the database only to a point-in-time when the backup was made. Even if you add the “WITH STOPAT=<time or log sequence number>” option to restore command you will not get the expected\u00a0result because this option applies\u00a0only when you restore the transaction log. Please see how a\u00a0periodic full backup works in the picture below:<\/p>\n

\"full<\/p>\n

The good thing about database\u00a0backup is that transactions continue running\u00a0during the backup process, although database I\/O operations may slow them down. However, since the\u00a0transaction log cannot be truncated at this time you may face a problem when a huge number of changes in the database during the\u00a0full backup make the transaction log grow rapidly and, therefore, occupy your free disk space.<\/p>\n

How Full Backup Works<\/h2>\n

A full database backup backs up\u00a0all data files and active part of the transaction log. The active part of the transaction log is necessary to restore database to a transactionally consistent point as shown in the picture below:<\/p>\n

\"How<\/p>\n

00:00<\/strong> Full backup starts. It forces a database checkpoint and this flushes\u00a0all dirty pages in the disk. Please note, if you use a simple recovery model the log is truncated, meaning that all committed transactions are removed from the log automatically. In full and bulk-logged recovery models it does not occur.<\/p>\n

00:01<\/strong> The backup process\u00a0reads Data Page 1 and adds it to the backup file.<\/p>\n

00:02<\/strong> The backup process\u00a0reads Data Page 2 and simultaneously\u00a0some changes in Data Page 1 take place. These changes are added to the Transaction Log as well. Now the\u00a0backup contains Data Page 2 and the old version of Data Page 1 (as it was at 00:01).<\/p>\n

00:03<\/strong> Data reading operation is complete and followed by Transaction Log reading. Transaction Log contains changes made in Data Page 1 (at 00:01) and they are added into the backup to be applied to Data Page 1 later during the restore process recovery stage.<\/p>\n

What Transaction Log Records Get into Full Backup<\/h2>\n

A full database backup doesn’t contain\u00a0all records from\u00a0your transaction log. Instead it chooses only those records that are necessary to make the restored copy of the database transactionally consistent. Those records begin either from\u00a0the latest active transaction or from the checkpoint created by the backup as shown in the picture below:<\/p>\n

\"Latest<\/p>\n

Transaction A started before the full backup began, made some changes after the checkpoint and committed\u00a0before the backup completed. In this case the full backup includes all transaction log records starting from\u00a0the latest active transaction. This implies that the full backup includes the whole transaction A with all changes that were made after the checkpoint to apply those\u00a0changes during the database recovery process.<\/p>\n

\"LSN<\/p>\n

The above picture shows that\u00a0transaction A started and committed before\u00a0the full backup began. Therefore, since all the changes made by the transaction were applied on the checkpoint the\u00a0backup will contain transaction log records added after the checkpoint.<\/p>\n

How to Make a Full Backup<\/h2>\n

To make a full backup you can\u00a0use T-SQL command<\/strong>:<\/em><\/p>\n

BACKUP DATABASE <\/span>your_database <\/em>TO DISK<\/span> = 'full.bak' <\/span><\/pre>\n

Another way to backup a database is to use SQL Server Management Studio (SSMS)<\/strong>: right click on the database you want to backup, select “Tasks”, then “Back up…”. Choose “Full” backup type, add a backup destination and click “OK”.<\/p>\n

However, using\u00a0SqlBackUpAndFtp<\/a><\/strong>\u00a0utility, that makes full database backup every 24 hours by default, is perhaps the easiest way of creating SQL Server backups. Moreover, you can benefit from using it’s advanced backup scheduling\u00a0if you require more sophisticated\u00a0backup scenarios.<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

The simplest kind of SQL Server backup is a full database backup. It provides a complete copy of the database but allows restoring the database only to a point-in-time when the backup was made.<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[156],"tags":[],"yoast_head":"\nFull Backup - Sql Server Backup Academy<\/title>\n<meta name=\"description\" content=\"Learn about SQL Server Full Backup\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/academy.sqlbak.com\/full-backup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Full Backup - Sql Server Backup Academy\" \/>\n<meta property=\"og:description\" content=\"Learn about SQL Server Full Backup\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academy.sqlbak.com\/full-backup\/\" \/>\n<meta property=\"og:site_name\" content=\"Sql Server Backup Academy\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-28T08:52:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-11-23T09:04:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2015\/10\/full-backup1.png\" \/>\n<meta name=\"author\" content=\"Alexandr Omelchenko\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandr Omelchenko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/academy.sqlbak.com\/full-backup\/\",\"url\":\"https:\/\/academy.sqlbak.com\/full-backup\/\",\"name\":\"Full Backup - Sql Server Backup Academy\",\"isPartOf\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#website\"},\"datePublished\":\"2015-10-28T08:52:39+00:00\",\"dateModified\":\"2015-11-23T09:04:27+00:00\",\"author\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\"},\"description\":\"Learn about SQL Server Full Backup\",\"breadcrumb\":{\"@id\":\"https:\/\/academy.sqlbak.com\/full-backup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/academy.sqlbak.com\/full-backup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/academy.sqlbak.com\/full-backup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Full Backup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/academy.sqlbak.com\/#website\",\"url\":\"https:\/\/academy.sqlbak.com\/\",\"name\":\"Sql Server Backup Academy\",\"description\":\"All you need to know about Sql Server database backup\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/academy.sqlbak.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\",\"name\":\"Alexandr Omelchenko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"caption\":\"Alexandr Omelchenko\"},\"sameAs\":[\"http:\/\/sqlbak.com\"],\"url\":\"https:\/\/academy.sqlbak.com\/author\/alexandr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Full Backup - Sql Server Backup Academy","description":"Learn about SQL Server Full Backup","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/academy.sqlbak.com\/full-backup\/","og_locale":"en_US","og_type":"article","og_title":"Full Backup - Sql Server Backup Academy","og_description":"Learn about SQL Server Full Backup","og_url":"https:\/\/academy.sqlbak.com\/full-backup\/","og_site_name":"Sql Server Backup Academy","article_published_time":"2015-10-28T08:52:39+00:00","article_modified_time":"2015-11-23T09:04:27+00:00","og_image":[{"url":"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2015\/10\/full-backup1.png"}],"author":"Alexandr Omelchenko","twitter_card":"summary","twitter_misc":{"Written by":"Alexandr Omelchenko","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/academy.sqlbak.com\/full-backup\/","url":"https:\/\/academy.sqlbak.com\/full-backup\/","name":"Full Backup - Sql Server Backup Academy","isPartOf":{"@id":"https:\/\/academy.sqlbak.com\/#website"},"datePublished":"2015-10-28T08:52:39+00:00","dateModified":"2015-11-23T09:04:27+00:00","author":{"@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8"},"description":"Learn about SQL Server Full Backup","breadcrumb":{"@id":"https:\/\/academy.sqlbak.com\/full-backup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academy.sqlbak.com\/full-backup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/academy.sqlbak.com\/full-backup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Full Backup"}]},{"@type":"WebSite","@id":"https:\/\/academy.sqlbak.com\/#website","url":"https:\/\/academy.sqlbak.com\/","name":"Sql Server Backup Academy","description":"All you need to know about Sql Server database backup","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/academy.sqlbak.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8","name":"Alexandr Omelchenko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","caption":"Alexandr Omelchenko"},"sameAs":["http:\/\/sqlbak.com"],"url":"https:\/\/academy.sqlbak.com\/author\/alexandr\/"}]}},"_links":{"self":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/2664"}],"collection":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/comments?post=2664"}],"version-history":[{"count":58,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/2664\/revisions"}],"predecessor-version":[{"id":3083,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/2664\/revisions\/3083"}],"wp:attachment":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/media?parent=2664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/categories?post=2664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/tags?post=2664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}