How to copy a database to another server
Like we’ve said, this is a new feature and it’s very easy to use. Below we will show you a step by step tutorial on how you can do this.
- First off we will have to have set up at least two computers in our SqlBak account in order to copy a database to another server.
- For this tutorial we will be using two example servers, the DatabaseServer which is the main server from where we will copy the data through the backup
- The second computer will be the RemoteDatabaseServer, where we will copy the data to, from the first computer
- After having set up the computers we will have to create a new job in order to have our backup created, which will later be copied to the second server
- In the Job screen just add the credentials in order to connect to your SQL Server instance, credentials which will automatically be used when running the backup job
- After adding the credentials to log into the SQL Server database, you will have to set up the location where the backup will be stored, and will later be automatically read by the restore operation
- Also, please take notice of all available options for your backup in order to make them more secure (use encryption), to make them occupy less space (use compression) etc.
- After setting up the job and saving the configuration, run the job in order to verify that the settings/credentials will work correctly
- Afterwards, go back to your Dashboard and select the Restore option from the server you want the restore to be made
- A simple interface will pop-up where the last backup will be automatically selected. Press the Restore on another computer link, which will take you to a new interface where you can select which computer, from those which you have set up in SqlBak, you will restore to
- You might receive an error when testing the SQL connection if your login user was just created and you haven’t logged into SQL Server with it yet
- SQL Server will require you to change your password at first login and this is mandatory before you can first use it for your database
- Also, even if you have managed to create a new credential and you succesfully tested the connection to SQL Server with the user’s credentials, you might get an error to the similar below, which means that you will need to add the dbCreator and sysAdmin Server Roles for the login you just created
- After you’ve added all the required credentials and tested the connection to your SQL Server instance on your remote server, just press the Restore database button and a loading bar will appear showing you the progress of the operation
- If the operation will be succesful you will receive a message like the one below
- Now your database has been remotely restored to your other server and you can go and review this using SSMS