{"id":30097,"date":"2021-01-18T03:11:23","date_gmt":"2021-01-17T19:11:23","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=30097"},"modified":"2022-09-08T19:13:36","modified_gmt":"2022-09-08T11:13:36","slug":"how-can-i-back-up-my-website-and-ms-sql-database","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-can-i-back-up-my-website-and-ms-sql-database","title":{"rendered":"How can I back up my website and MS SQL database?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"30097\" class=\"elementor elementor-30097\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0fb3d6e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0fb3d6e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8a9b406\" data-id=\"8a9b406\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0326187 elementor-widget elementor-widget-heading\" data-id=\"0326187\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How can I back up my website and MS SQL database?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f10755a elementor-widget elementor-widget-text-editor\" data-id=\"f10755a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Backing up your SQL Server databases constantly is a good practice for any database administrator to avoid data loss or corruption. Backing up is the safest way to protect and restore your data from many failures like hardware failure, user failures, media errors and many more.<\/p><p>Moreover, a database backup is also ideal for day-to-day administrative tasks such as, database mirroring and copying a database from one server to another.<\/p><p>MSSQL is the most widely used database management system for Windows-based\u00a0systems powered by Microsoft. It is used to store website data such as blog and user information.<\/p><p>In this guide, we will show you how to backup and restore the MSSQL database on Windows operating system.<\/p><p><strong>Prerequisites<\/strong><\/p><ul><li>A server running on <strong>Windows server 2016<\/strong>.<\/li><li>SQL Server and SQL Server Management Studio (<strong>SSMS<\/strong>) installed in your system.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-901a25f elementor-widget elementor-widget-heading\" data-id=\"901a25f\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Backup MS SQL Database<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fe5bcef elementor-widget elementor-widget-text-editor\" data-id=\"fe5bcef\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>You may download all your websites via FTP to your local PC.<\/p><p>However, to access the MS SQL server, we will send you the configurations for MS SQL upon request and you will be able to remotely access the server and perform a backup.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-708a47b elementor-widget elementor-widget-heading\" data-id=\"708a47b\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Create New Database<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-788c370 elementor-widget elementor-widget-text-editor\" data-id=\"788c370\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol><li style=\"list-style-type: none;\"><ol><li>Firstly, open <strong>SSMS<\/strong> from the <strong>Start<\/strong> menu.<br \/><br \/><\/li><li>Secondly, click on <strong>Connect<\/strong> button to connect your MS SQL Server.<br \/><br \/><\/li><li>Then, click on <strong>New Query<\/strong> to open a new query window.<br \/><br \/><\/li><li>Type the following query in the above query window to create a new database named NEWDB and create a new table named TABLE1:<br \/><pre class=\"wp-block-preformatted\">USE [master]\nGO\nCREATE DATABASE [NEWDB]\nGO\nUSE [NEWDB]\nGO\nCREATE TABLE TABLE1 (\nID INT NOT NULL PRIMARY KEY,\na1 VARCHAR(100) NOT NULL,\ndt1 DATETIME NOT NULL DEFAULT getdate()\n)\nGO<\/pre><\/li><li>Next, click on the <strong>Execute<\/strong> button to run the query.\u00a0<\/li><\/ol><\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-17ab12e elementor-widget elementor-widget-heading\" data-id=\"17ab12e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Take Backup with SSMS<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-803448b elementor-widget elementor-widget-text-editor\" data-id=\"803448b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol><li>Firstly, open up <strong>SSMS<\/strong> and expand <strong>Databases<\/strong> section.<br \/><br \/><\/li><li>Secondly, right-click on the <strong>NEWDB\u00a0<\/strong>and click on the\u00a0<strong>Tasks<\/strong> &gt;\u00a0<strong>Back<\/strong>\u00a0<strong>Up<\/strong>.<br \/><br \/><\/li><li>Select all required information like, Database, Backup type, Backup path then click <strong>OK<\/strong>.<br \/><br \/><\/li><li>Lastly,\u00a0you get the confirmation message <strong>The backup of database \u201cDBTEST\u201d completed successfully\u00a0<\/strong>if the backup is successful.<\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-68f9b92 elementor-widget elementor-widget-heading\" data-id=\"68f9b92\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Restore MS SQL Backup<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2bf5f4d elementor-widget elementor-widget-text-editor\" data-id=\"2bf5f4d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol><li>Firstly, open <strong>SSMS<\/strong>.<br \/><br \/><\/li><li>Then, right-click on the <strong>NEWDB\u00a0<\/strong>and click on <strong>Tasks<\/strong> &gt;\u00a0<strong>Restore<\/strong> &gt;\u00a0<strong>Database<\/strong>.\u00a0<br \/><br \/><\/li><li>Next, select <strong>Device<\/strong> and click on the \u201c<strong>\u2026<\/strong>\u201c.<br \/><br \/><\/li><li>Click on the\u00a0<strong>Add<\/strong>\u00a0button.<br \/><br \/><\/li><li>After that, select your database backup file and click <strong>OK<\/strong>.<br \/><br \/><\/li><li>Click on the\u00a0<strong>OK<\/strong>\u00a0button again to close the \u201c<strong>Select backup devices window<\/strong>\u201d.\u00a0<br \/><br \/><\/li><li>Lastly, click on the\u00a0<strong>OK<\/strong>\u00a0button to restore the backup of your database.<\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7f30f04 elementor-widget elementor-widget-text-editor\" data-id=\"7f30f04\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Check out the next article on <a href=\"https:\/\/www.casbay.com.my\/guide\/kb\/how-can-i-access-ms-sql-2000\/\">How can I access MS SQL 2000?<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>How can I back up my website and MS SQL database? Backing up your SQL Server databases constantly is a good practice for any database administrator to avoid data loss or corruption. Backing up is the safest way to protect and restore your data from many failures like hardware failure, user failures, media errors and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[60],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30097"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=30097"}],"version-history":[{"count":1,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30097\/revisions"}],"predecessor-version":[{"id":31734,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30097\/revisions\/31734"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=30097"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=30097"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=30097"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=30097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}