{"id":2859,"date":"2015-11-19T03:56:42","date_gmt":"2015-11-19T08:56:42","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=2859"},"modified":"2023-10-17T05:35:51","modified_gmt":"2023-10-17T09:35:51","slug":"copy_only_backup","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/copy_only_backup\/","title":{"rendered":"COPY_ONLY Backup"},"content":{"rendered":"

In order to understand how to operate the “COPY_ONLY” option and its nature, let’s consider the following example. Assume that a full database backup starts at 00:00 once a day and a differential backup starts every six hours. In the picture below you can see what database changes (marked as pages) are included into each of database backups shown on the picture.<\/p>\n

\"Backup<\/p>\n

Assume that there is a need to make an extra full database backup to retrieve it on\u00a0another server. Suppose that this backup is done after the database change #4. If the full backup is made without T-SQL option “COPY_ONLY”, \u00a0the differential backup that was made after such full backup will no longer contain changes #1, #2, #3 and #4:<\/p>\n

\"Without<\/p>\n

The picture above shows\u00a0that the full backup that was made after the database change #4 has disrupted the\u00a0backup schedule set by the user (marked as green arrows). The following two differential backups that were made according to the schedule at 12:00 and 18:00 completely depended on the last extra full backup (marked as red arrows). If the last full database backup that was made after database change #4 is not saved and the database failure occurs, the best way out\u00a0is to restore the database to the database change#3 state (06:00). All changes that are highlighted in red will be lost.<\/p>\n

To make a full database backup and thus keep backups schedule safe and sound, it is necessary to use “COPY_ONLY” option. In this case, the database backup sequence\u00a0will not be broken and the full backup will be available.\"With<\/p>\n

Copy-only Transaction Log Backup<\/h2>\n

You can use the COPY_ONLY option with transaction log backups as well (note though that they are suitable for full or bulk-logged recovery models). If you need to make an extra transaction log backup and not to break the backup chain, then use the “WITH COPY_ONLY” option, otherwise if the backup file is lost the restore process will not be possible. It has to be admitted that the “WITH NO_TRUNCATE” option does not truncate the transaction log.<\/p>\n

How to Make a\u00a0Copy-only Backup<\/h2>\n

To make a copy-only backup simply add “COPY_ONLY”\u00a0<\/strong>clause to BACKUP DATABASE command:<\/p>\n

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

Another way of making a copy-only backup is using SQL Server Management Studio (SSMS)<\/strong>: right-click on the database you want to backup, select “Tasks”, then “Back up…”. Select type option as “Full”, check the “Copy-only backup” checkbox, add backup destination, and then click “OK”.<\/p>\n

If you use\u00a0SQLBackupAndFTP<\/a><\/strong>\u00a0to schedule your database backups, please click “more settings…” and scroll down to the “Backup options”, then check off “Copy Only”.<\/p>\n

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

In order to understand how to operate the “COPY_ONLY” option and its nature, let’s consider the following example. Assume that a full database backup starts at 00:00 once a day and a differential backup starts every six hours. In the picture below you can see what database changes (marked as pages) are included into each […]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[157],"tags":[],"yoast_head":"\nCOPY_ONLY Backup - Sql Server Backup Academy<\/title>\n<meta name=\"description\" content=\"Learn about SQL Server COPY_ONLY 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\/copy_only_backup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"COPY_ONLY Backup - Sql Server Backup Academy\" \/>\n<meta property=\"og:description\" content=\"Learn about SQL Server COPY_ONLY Backup\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academy.sqlbak.com\/copy_only_backup\/\" \/>\n<meta property=\"og:site_name\" content=\"Sql Server Backup Academy\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-19T08:56:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-17T09:35:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2015\/11\/Backup-Full-Diff-1.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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/academy.sqlbak.com\/copy_only_backup\/\",\"url\":\"https:\/\/academy.sqlbak.com\/copy_only_backup\/\",\"name\":\"COPY_ONLY Backup - Sql Server Backup Academy\",\"isPartOf\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#website\"},\"datePublished\":\"2015-11-19T08:56:42+00:00\",\"dateModified\":\"2023-10-17T09:35:51+00:00\",\"author\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\"},\"description\":\"Learn about SQL Server COPY_ONLY Backup\",\"breadcrumb\":{\"@id\":\"https:\/\/academy.sqlbak.com\/copy_only_backup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/academy.sqlbak.com\/copy_only_backup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/academy.sqlbak.com\/copy_only_backup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"COPY_ONLY 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":"COPY_ONLY Backup - Sql Server Backup Academy","description":"Learn about SQL Server COPY_ONLY 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\/copy_only_backup\/","og_locale":"en_US","og_type":"article","og_title":"COPY_ONLY Backup - Sql Server Backup Academy","og_description":"Learn about SQL Server COPY_ONLY Backup","og_url":"https:\/\/academy.sqlbak.com\/copy_only_backup\/","og_site_name":"Sql Server Backup Academy","article_published_time":"2015-11-19T08:56:42+00:00","article_modified_time":"2023-10-17T09:35:51+00:00","og_image":[{"url":"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2015\/11\/Backup-Full-Diff-1.png"}],"author":"Alexandr Omelchenko","twitter_card":"summary","twitter_misc":{"Written by":"Alexandr Omelchenko","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/academy.sqlbak.com\/copy_only_backup\/","url":"https:\/\/academy.sqlbak.com\/copy_only_backup\/","name":"COPY_ONLY Backup - Sql Server Backup Academy","isPartOf":{"@id":"https:\/\/academy.sqlbak.com\/#website"},"datePublished":"2015-11-19T08:56:42+00:00","dateModified":"2023-10-17T09:35:51+00:00","author":{"@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8"},"description":"Learn about SQL Server COPY_ONLY Backup","breadcrumb":{"@id":"https:\/\/academy.sqlbak.com\/copy_only_backup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academy.sqlbak.com\/copy_only_backup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/academy.sqlbak.com\/copy_only_backup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"COPY_ONLY 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\/2859"}],"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=2859"}],"version-history":[{"count":21,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/2859\/revisions"}],"predecessor-version":[{"id":3876,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/2859\/revisions\/3876"}],"wp:attachment":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/media?parent=2859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/categories?post=2859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/tags?post=2859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}