{"id":1823,"date":"2021-01-25T07:00:00","date_gmt":"2021-01-25T04:00:00","guid":{"rendered":"https:\/\/www.dataplatform.gr\/?p=1823"},"modified":"2024-12-03T21:04:44","modified_gmt":"2024-12-03T18:04:44","slug":"pos-mporoyme-na-kanoyme-mazika-backups-restores-ton","status":"publish","type":"post","link":"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/","title":{"rendered":"How can we bulk backup\/restore databases in SQL Server"},"content":{"rendered":"<p>Many times we may need to backup many small databases and transfer them to another system or restore them to the same one. The process of <strong>backup\/restore<\/strong> of each base one by one will be time consuming and can lead to errors. In this article we will see a <strong>T-SQL<\/strong> <strong>script<\/strong> that I have written about this work and how it is used.<\/p>\n\n\n\n<p>The information we need is in the system views <em>master_files<\/em>  and <em>databases<\/em>. To extract this information we will need to use <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/language-elements\/declare-cursor-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">cursor<\/a> the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/queries\/with-common-table-expression-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">Common Table Expression<\/a> <em>(CTE)<\/em>. I have written this particular script using <strong>CTE<\/strong>.<\/p>\n\n\n\n<p>In newer versions from SQL Server 2017 and later, with the function  <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/functions\/string-agg-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">STRING_AGG<\/a> we can join in one line all the paths for the files needed for the restore. But because we want the script to work in older versions as well, we will use the function <a href=\"https:\/\/stackoverflow.com\/questions\/31211506\/how-stuff-and-for-xml-path-work-in-sql-server\" target=\"_blank\" rel=\"noreferrer noopener\">stuff along with Xml PATH<\/a>.<\/p>\n\n\n\n<p><strong>All we&#039;ll need to tweak are the parameters<\/strong> <strong>backup_loc, rest_dbf, rest_log and skipped dbs<\/strong> (located at the end of the script). In these parameters we define where the backup files should be placed and where they will be restored. We also have the possibility to exclude databases from the process such as the systemic ones that I have already excluded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The script<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">DECLARE @date CHAR(8)\nSET @date = (SELECT CONVERT(char(8), GETDATE(), 112))\n\nDECLARE @backup_loc VARCHAR(125)  \nSET @backup_loc = 'X:\\backups\\'  -- \u03a3\u03b5 \u03c0\u03bf\u03b9\u03ac \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03b8\u03b1 \u03c0\u03b1\u03c1\u03b8\u03bf\u03cd\u03bd \u03c4\u03b1 backups\n\nDECLARE @rest_dbf VARCHAR(125)\nSET @rest_dbf = 'D:\\Databases\\'   -- \u03a3\u03b5 \u03c0\u03bf\u03b9\u03ac \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03b8\u03b1 \u03b3\u03af\u03bd\u03bf\u03c5\u03bd restore \u03c4\u03b1 datafiles\n\nDECLARE @rest_log VARCHAR(125)\nSET @rest_log = 'L:\\Logfiles\\';  -- \u03a3\u03b5 \u03c0\u03bf\u03b9\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03b8\u03b1 \u03b3\u03af\u03bd\u03bf\u03c5\u03bd restore \u03c4\u03b1 logfiles\n\n\nWITH CTE ( DatabaseName, Npath )\n          AS ( SELECT DISTINCT\n                        DB_NAME(database_id) ,\n                        STUFF((SELECT   ' ' + CHAR(13)+', MOVE ''' + name + ''''\n                                        + CASE Type\n                                            WHEN 0 THEN ' TO ''' +@rest_dbf\n                                            ELSE ' TO ''' +@rest_log\n                                          END\n                                        + REVERSE(LEFT(REVERSE(physical_name),\n                                                       CHARINDEX('\\',\n                                                              REVERSE(physical_name),\n                                                              1) - 1)) + ''''\n                               FROM     sys.master_files sm1\n                               WHERE    sm1.database_id = sm2.database_ID\n                        FOR   XML PATH('') ,\n                                  TYPE).value('.', 'varchar(max)'), 1, 1, '') AS Npath\n               FROM     sys.master_files sm2\n  )\n--select * from CTE\nSELECT\n\t'BACKUP DATABASE ' + name + ' TO DISK = ''' + @backup_loc + '' + name + '_' + @date + '.bak'' WITH COMPRESSION, COPY_ONLY, STATS=5' as Backup_Commands_onSource,\n\t'RESTORE DATABASE '+ name + ' FROM DISK = ''' + @backup_loc + '' + name + '_' + @date + '.bak'' WITH RECOVERY, REPLACE, STATS=5 ' + CTE.Npath as Restore_Commands_onTarget\nFROM sys.databases d\n\tINNER JOIN CTE ON d.name = cte.databasename\nWHERE d.name not in('master','tempdb','model','msdb') --skipped DBs\nGO\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">The result<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"164\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/08\/1-bks.png\" alt=\"\" class=\"wp-image-1824\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/08\/1-bks.png 670w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/08\/1-bks-300x73.png 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/figure>\n\n\n\n<p>We use the generated results for the process. The first column in the system where we will do the backups and after transferring the files (the .bak created from the backups), we execute the second column of restore statements in the other system.<\/p>\n\n\n\n<p>The example of the statement for backup of the first base.<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>BACKUP DATABASE bi_test TO DISK = 'X:\\backups\\bi_test_20200825.bak' WITH COMPRESSION, COPY_ONLY, STATS=5<\/code><\/pre>\n\n\n\n<p>The example of the statement to restore the first base.<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>RESTORE DATABASE bi_test FROM DISK = 'X:\\backups\\bi_test_20200825.bak' WITH RECOVERY, REPLACE, STATS=5  , MOVE 'bi_test' TO 'D:\\Databases\\bi_test.mdf'  , MOVE 'bi_test_log' TO 'L:\\Logfiles\\bi_test_log.ldf'  , MOVE 'bi_test2' TO 'D:\\Databases\\bi_test2.ndf'<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>Many times we may need to backup several small databases and transfer them to another system or restore them to the same one. The backup\/restore process of each database one by one will be time-consuming and may lead to errors. In this article we will look at a T-SQL script that I have [...]<\/p>","protected":false},"author":1,"featured_media":702,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,15],"tags":[29,23,30,39],"class_list":["post-1823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-ms-sqlserver","tag-databases","tag-microsoft","tag-rdbms","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\" \/>\n<meta property=\"og:description\" content=\"\u03a0\u03bf\u03bb\u03bb\u03ad\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03c7\u03c1\u03b5\u03b9\u03b1\u03c3\u03c4\u03b5\u03af \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 backup \u03c0\u03bf\u03bb\u03bb\u03ad\u03c2 \u03bc\u03b9\u03ba\u03c1\u03ad\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03c4\u03b9\u03c2 \u03bc\u03b5\u03c4\u03b1\u03c6\u03ad\u03c1\u03bf\u03c5\u03bc\u03b5 \u03c3\u03b5 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf \u03ac\u03bb\u03bb\u03bf \u03c3\u03cd\u03c3\u03c4\u03b7\u03bc\u03b1 \u03ae \u03bd\u03b1 \u03c4\u03b9\u03c2 \u03b5\u03c0\u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03bf\u03c5\u03bc\u03b5 \u03c3\u03c4\u03bf \u03af\u03b4\u03b9\u03bf. \u0397 \u03b4\u03b9\u03b1\u03b4\u03b9\u03ba\u03b1\u03c3\u03af\u03b1 \u03c4\u03bf\u03c5 backup\/restore \u03c4\u03b7\u03c2 \u03ba\u03ac\u03b8\u03b5 \u03b2\u03ac\u03c3\u03b7\u03c2 \u03bc\u03af\u03b1 \u03bc\u03af\u03b1 \u03b8\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c7\u03c1\u03bf\u03bd\u03bf\u03b2\u03cc\u03c1\u03b1 \u03ba\u03b1\u03b9 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03bf\u03b4\u03b7\u03b3\u03ae\u03c3\u03b5\u03b9 \u03c3\u03b5 \u03bb\u03ac\u03b8\u03b7. \u03a3\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03b8\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 T-SQL script \u03c0\u03bf\u03c5 \u03ad\u03c7\u03c9 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/\" \/>\n<meta property=\"og:site_name\" content=\"DataPlatform.gr\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dataplatform.gr\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-25T04:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-03T18:04:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stratos Matzouranis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stratos Matzouranis\" \/>\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\":\"Article\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/\"},\"author\":{\"name\":\"Stratos Matzouranis\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\"},\"headline\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\\\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server\",\"datePublished\":\"2021-01-25T04:00:00+00:00\",\"dateModified\":\"2024-12-03T18:04:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/\"},\"wordCount\":55,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"keywords\":[\"Databases\",\"Microsoft\",\"RDBMS\",\"SQL\"],\"articleSection\":[\"Databases\",\"Microsoft SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/\",\"name\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\\\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"datePublished\":\"2021-01-25T04:00:00+00:00\",\"dateModified\":\"2024-12-03T18:04:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Microsoft SQL Server\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/ms-sqlserver\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\\\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"name\":\"dataplatform.gr - Sky is not the limit!\",\"description\":\"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dataplatform.gr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\",\"name\":\"dataplatform.gr\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"width\":322,\"height\":139,\"caption\":\"dataplatform.gr\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dataplatform.gr\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dataplatform-gr\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\",\"name\":\"Stratos Matzouranis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"caption\":\"Stratos Matzouranis\"},\"sameAs\":[\"https:\\\/\\\/www.dataplatform.gr\"],\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/en\\\/author\\\/stratos-matzouranis\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","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:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/","og_locale":"en_US","og_type":"article","og_title":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","og_description":"\u03a0\u03bf\u03bb\u03bb\u03ad\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03c7\u03c1\u03b5\u03b9\u03b1\u03c3\u03c4\u03b5\u03af \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 backup \u03c0\u03bf\u03bb\u03bb\u03ad\u03c2 \u03bc\u03b9\u03ba\u03c1\u03ad\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03c4\u03b9\u03c2 \u03bc\u03b5\u03c4\u03b1\u03c6\u03ad\u03c1\u03bf\u03c5\u03bc\u03b5 \u03c3\u03b5 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf \u03ac\u03bb\u03bb\u03bf \u03c3\u03cd\u03c3\u03c4\u03b7\u03bc\u03b1 \u03ae \u03bd\u03b1 \u03c4\u03b9\u03c2 \u03b5\u03c0\u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03bf\u03c5\u03bc\u03b5 \u03c3\u03c4\u03bf \u03af\u03b4\u03b9\u03bf. \u0397 \u03b4\u03b9\u03b1\u03b4\u03b9\u03ba\u03b1\u03c3\u03af\u03b1 \u03c4\u03bf\u03c5 backup\/restore \u03c4\u03b7\u03c2 \u03ba\u03ac\u03b8\u03b5 \u03b2\u03ac\u03c3\u03b7\u03c2 \u03bc\u03af\u03b1 \u03bc\u03af\u03b1 \u03b8\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c7\u03c1\u03bf\u03bd\u03bf\u03b2\u03cc\u03c1\u03b1 \u03ba\u03b1\u03b9 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03bf\u03b4\u03b7\u03b3\u03ae\u03c3\u03b5\u03b9 \u03c3\u03b5 \u03bb\u03ac\u03b8\u03b7. \u03a3\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03b8\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 T-SQL script \u03c0\u03bf\u03c5 \u03ad\u03c7\u03c9 [&hellip;]","og_url":"https:\/\/www.dataplatform.gr\/en\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/","og_site_name":"DataPlatform.gr","article_publisher":"https:\/\/www.facebook.com\/dataplatform.gr\/","article_published_time":"2021-01-25T04:00:00+00:00","article_modified_time":"2024-12-03T18:04:44+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","type":"image\/png"}],"author":"Stratos Matzouranis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stratos Matzouranis","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#article","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/"},"author":{"name":"Stratos Matzouranis","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf"},"headline":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server","datePublished":"2021-01-25T04:00:00+00:00","dateModified":"2024-12-03T18:04:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/"},"wordCount":55,"commentCount":0,"publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","keywords":["Databases","Microsoft","RDBMS","SQL"],"articleSection":["Databases","Microsoft SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/","url":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/","name":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#primaryimage"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","datePublished":"2021-01-25T04:00:00+00:00","dateModified":"2024-12-03T18:04:44+00:00","breadcrumb":{"@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#primaryimage","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.dataplatform.gr\/pos-mporoyme-na-kanoyme-mazika-backups-restores-ton\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae","item":"https:\/\/www.dataplatform.gr\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.dataplatform.gr\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"Microsoft SQL Server","item":"https:\/\/www.dataplatform.gr\/category\/databases\/ms-sqlserver\/"},{"@type":"ListItem","position":4,"name":"\u03a0\u03ce\u03c2 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03bc\u03b1\u03b6\u03b9\u03ba\u03ac backup\/restore \u03c4\u03c9\u03bd \u03b2\u03ac\u03c3\u03b5\u03c9\u03bd \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03c3\u03c4\u03bf\u03bd SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.dataplatform.gr\/#website","url":"https:\/\/www.dataplatform.gr\/","name":"dataplatform.gr - Sky is not the limit!","description":"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.","publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dataplatform.gr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dataplatform.gr\/#organization","name":"dataplatform.gr","url":"https:\/\/www.dataplatform.gr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","width":322,"height":139,"caption":"dataplatform.gr"},"image":{"@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dataplatform.gr\/","https:\/\/www.linkedin.com\/company\/dataplatform-gr\/"]},{"@type":"Person","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf","name":"Stratos Matzouranis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","caption":"Stratos Matzouranis"},"sameAs":["https:\/\/www.dataplatform.gr"],"url":"https:\/\/www.dataplatform.gr\/en\/author\/stratos-matzouranis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/comments?post=1823"}],"version-history":[{"count":1,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1823\/revisions"}],"predecessor-version":[{"id":5842,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1823\/revisions\/5842"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media\/702"}],"wp:attachment":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media?parent=1823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/categories?post=1823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/tags?post=1823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}