How to Backup and Restore SQL Database from One Server to Another Server
Tags: sql, database
Published: 2020-10-27 04:12:17

One of the common tasks of Database Administrators (DBAs) is to back up the database and then restore it. Using the Microsoft SQL Server software, you can store, sort, and retrieve data as requested by other computer applications and software. You can use this software for installed applications on the same computer and also for other computers through the network. However, while using this software, you may face multiple issues. In this new article, we will discuss how to move the database from one computer to another computer or one server to another server, by using the backup and restore the function of Microsoft SQL Server.

How to Move SQL Database from One Server to Another?

Microsoft SQL Server supports local computers for a single users (as discussed in the introduction). However, for large (multi-user application) scale data, Microsoft also provides server-side editions. To help the customers, Microsoft also provides some powerful features in the same software. In order to move database from one server to another, you can use such advanced features of the MS SQL Server. If you are not familiar with the MS SQL Server and how you can use its backup and restore database function for moving the database from one server to another, read the steps given below.

Step 1:
Open MS SQL Server and select the database. After selecting the database, right-click on it. From the options that appear, select “Task” and then the “Backup” option. (See the image below).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/70swz5c9j2ykv7qqc832.png)

Step 2: 
A new popup widow will open, with multiple options. Be careful and select the right options. Enter the database name in the first field. In the third field, select the backup type. Here, you can select the option “Full” from the drop down. Next, under the “Backup component”, select the “Database” option. In the last section, you will see the add button. Here, you need to add the path where you want to store the database. Make sure once again that you’ve selected the right options.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p8e73c2axe2ahhcjym5q.png)

Step 3: 
After successfully completing all the steps, you need to copy the file and paste it into another computer, where you want to move the database. After pasting the database, open MS SQL server and right click on the database root folder. Here, you need to select the “Restore Database” option. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jdzxbr8e6u57pxfb769l.png)

Step 4: 
After selecting the database restore option, a new window will open (see below image).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rydi3iq73okz1g8opts0.png)

Press the browse button and you will see a new window on your screen.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/257q7uug13dgwlpf3g4y.png)

Select the backup file and press the OK button. A new window will appear (like the below given image).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pgt48tac7u8fngkzadm7.png)
Here, you can see that the file is successfully added. Now, press the OK button and you will see that your file is successfully restored.

What To Do if Backup is Damaged?
However, sometimes, when you try to restore and backup the .bak, you might find the file is damaged due to viruses or any other reason such as a hard disk failure. In such a case, you need to select a good tool for recovering the .bak file. One of the best tools to resolve MS SQL Server problems is Stellar Repair for MS SQL. It is an advanced software that repairs corrupt SQL database files and recovers all the database components.

The software offers three options:
1- Repair MS SQL Database: It will repair corrupt MS SQL Server Database.
2- Recover MS SQL Server Password: It will recover your MS SQL Server Password.
3- Extract from MS SQL Backup: You can use this option to repair the backup file, in case it is corrupted.
For more details about the tool, check Stellar Toolkit for MS SQL: https://www.stellarinfo.com/sql-database-toolkit.php .

Conclusion
In this article, we’ve discussed how to move database from one server to another server by using the backup and restore method. However, if the backup is corrupted, you need to use a third-party tool such as Stellar Toolkit for MS SQL to repair the backup files.