Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:2xfaq_how_to_back_up_the_database [2017/03/17 17:46]
127.0.0.1 external edit
en:2xfaq_how_to_back_up_the_database [2022/09/15 16:47] (current)
phit [How to Back Up and Restore the Database]
Line 2: Line 2:
  
 ====== How to Back Up and Restore the Database ====== ====== How to Back Up and Restore the Database ======
-BioStar 2's database has gone through a few changes since it's release. \\  +This article ​is outdated.  
-The AC database started out with the SQLite Database and in version 2.2.1, the MariaDB T&A database was released. \\ +Please ​refer to the following ​article: [[https://support.supremainc.com/en/support/solutions/articles/24000005907--biostar-2-database-backup-and-restore-instructions-maria-db--|Maria DB Backup Instructions]] ​
-Starting version 2.3, both databases became Maria DB. Hence the backup method has changed as well. \\  +
-Refer to the image below to see the changes in the Database in BioStar 2 versions. \\  +
- +
-{{:​en:​2xfaq_database_backup01.PNG?​nolink&​500|}} +
- +
-<callout type="​warning"​ icon="​true">​  +
-Automatic database backup of AC database ​is only supported up to version 2.2.1  +
-</​callout>​ +
-\\  +
-===== 2.0 ~ 2.2.2 Database Backup and Restore ===== +
- +
-You can use refer to the PDF below to back up your BioStar 2.0~2.2.2 database. \\ +
-Note that the AC database can be backed up easily with a copy and paste after stopping BioStar 2 services because it is a SQLite DB. \\ +
-For the T&A database, use the option to back up with the instructions shown in **2.3~ Database Backup** below. ​ \\ +
- +
-<callout type="​primary"​ icon="​true">​  +
-Click on the download button to download the PDF file. +
-</​callout>​ +
- +
-{{pdfjs 80%,​400px>​ :​en:​2xfaq_biostar_2.0_-_2.2.2_database_backup_and_restore.pdf|BioStar 2.0~2.2.2 Database Backup and Restore}} +
- +
-===== 2.3~ Database Backup ===== +
-You will have to install MySQL Workbench to back up and restore the database. \\ +
- +
-<callout type="​warning"​ icon="​true">​  +
-**Important Note for T&A Users** \\  +
-If you are making a clean uninstall and reinstalling BioStar 2.3 in the server PC or if you are installing and restoring BioStar 2.3 in another PC, you will have to back up the security folder in the path below: \\ +
-C:\Program Files\BioStar 2(x64)\ta\security \\ \\ +
-Copy the files in the folder and paste it the same path of your new BioStar 2.3 when restoring your T&A. \\  +
-This only applies to version 2.3 T&A and this process is not required for version 2.4 \\ +
-</​callout>​ +
- +
-<callout type="​info"​ icon="​true">​  +
-It is recommended to stop your BioStar 2 server when backing up and restoring the database. +
-</​callout>​ +
-1. Open a web browser. ​ \\ +
-2. Access ​the following ​[[https://​www.mysql.com/​products/​workbench/​ |link]]\\ +
-3. Click **Download Now** to download MySQL Workbench. \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore001.png|500}} \\ +
- +
-4. Click **Download** to download the **MSI Installer**. ​  \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore002.png|500}} \\ +
- +
-5. Click **No thanks, just start my download.** \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore003.png|500}} \\ +
- +
-6. Run the downloaded file. \\ +
-7. It will ask you to install the prerequisites. Click **Download Prerequisites**. \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore004.png|500}} \\ +
- +
-8. The link will guide you to download the files below. Install if you don’t already have them: +
-  * [[https://www.microsoft.com/en-us/download/details.aspx?​id=30653|Microsoft .NET Framework 4.5]] +
-  * [[https://www.microsoft.com/​en-us/​download/​details.aspx?​id=48145|Visual C++ Redistributable for Visual Studio 2015]] +
- +
-9. After installing all the prerequisites,​ run the MySQL Workbench installer again. \\ +
-10. Launch MySQL Workbench. \\ +
-11. Click the **+** sign. \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore005.png|500}} \\ +
- +
-12. Set a name for **Connection Name**. \\  +
-13. Set the **Port** to 3312.  \\ +
-14. Enter your database administrator id in **Username**. \\ +
-The account you configured in the BioStar ​express installation is **root**. \\ +
-15. Click **Store in Vault …** and enter password. ​ \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore006.png|500}} \\ +
- +
-16. Click **Test Connection** and check that it is successful. \\ +
-17. If you see a **Connection Warning** click **Continue Anyway**. ​ \\ +
-{{:​en:​2x_faq_maria_db_backup_and_restore007.png|500}} \\ +
- +
-18. Click **Ok** to connect to the database. \\ +
-19. Select **Data Export** on the **Navigator**. \\  +
-20. **On Object Selection – Schema**, select the database you want to back up.  \\ +
-<callout type="​info"​ icon="​true">​  +
-It is recommended to back up the AC and TA database separately. ​ \\ +
-biostar2_ac is the AC database and biostar_tna is the T&A database. \\ +
-</​callout>​ +
- +
-21. On the right column **Schema Objects**, check that all tables are checked. \\ +
-22. On **Objects to Export** check all three items. \\  +
-23. For **Export Options** select **Export to Self-Contained File**. \\ +
-24. Check **Include Create Schema**. ​ \\ +
-25. Click Start Export. \\ \\ +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore008.png|500}} \\ +
- +
-The process will take several minutes ​and longer based on the size of your database. \\ +
- +
-===== 2.3~ Database Restore ===== +
-1. Install MySQL Work Bench and Connect to the database as shown above in the back up process. ​ \\ +
-2. Select **Data Import/​Restore**. \\ +
-3. Click **Import from Self-Contained File** radio button. \\ +
-4. Select your file to import by pressing the **…** button. \\ +
-5. Click **Start Import**. +
- +
-{{:​en:​2x_faq_maria_db_backup_and_restore009.png|500}} \\ +
- +
-<callout type="​warning"​ icon="​true">​  +
-When you restore the T&A database, you have to stop and start all BioStar 2 services again with **BioStar Setting**. +
-</​callout>​+