DATABASES > Cloud DBaaS > Activating and managing a service > Importing backups on Cloud DBaaS

2.8 Importing backups on Cloud DBaaS

 
To generate the script:
  • Launch "SQL Server Management Studio". Right-click on the database you want to export and click on "Tasks" > "Generate Scripts...".
  • The "Generate and Publish Scripts" window will appear. Press "Next >".
  • On the "Choose Objects" page, select "Script whole database and all database objects" or "Select specific database objects" and then click on "Next >".
  • Now, in the "Set Scripting Options" window, choose "Save Scripts to a specific location" and click on "Advanced" to configure additional export options. Then press "Continue".
  • A summary page will now be displayed, press "Continue".
  • Finally, click on "End" to save or publish the scripts.
Import SQL to the database using the command:
  • sqlcmd -S IP_Istanza_Dbaas -d DB_Name_Dbaas -U username_dbaas -P -i C:\path\to\file.sql
The .sql files contain all the queries needed to populate the database.
To generate the script:
  • Click on "Export data" under the "Manage" tab in the left menu.
  • A list of available databases will be displayed.
  • Check the box next to the database you want to export.
  • If you want to back up a specific table, click on the database name.
  • All the tables in the database selected will be shown on the right.
  • Check the box next to the table.
  • Select the option required under "Export options".
  • Using the "Self-Contained File" method makes restoring a complete database in the event of disaster recovery much easier. The other option, "Export to Dump Project Folder" will make a separate backup of each table. Using the "Export to Dump Project Folder" method makes restoring individual tables easier, should this be required. The method selected will depend on the purpose of the backup.  If you are just archiving the database, you should use "Export to Self-Contained File".
  • Click on "Start Export".
Import SQL into the database using the command:
  • mysql -h IP_Istanza_Dbaas -u username_dbaas -p DB_Name_Dbaas < \path\to\file.sql
The .sql files contain all the queries needed to populate the database.