Backup and Restore Single Schema/Table

人走茶凉 提交于 2020-02-05 12:44:45

问题


Is there a way to backup or restore a specific schema or table on a Cloud SQL server? Backing up the entire set of data, but then being able to restore only certain schemas or tables would be very helpful for multi-tenant systems.


回答1:


The Cloud SQL use MySQL database with some limitations. You can check out the unsupported features and functions at the following link:

https://cloud.google.com/sql/faq#supportmysqlfeatures

With this in mind any backup/restore tool that are being used for MySQL should work for Google Cloud SQL as well. Using mysqldump for import/export of Cloud SQL is covered at this document:

https://cloud.google.com/sql/docs/import-export

You can use mysqldump to backup specific table or backup entire database and restore only specific tables using the solutions offered in these links:

Can I restore a single table from a full mysql mysqldump file?

How to take backup of a single table in a MySQL database?




回答2:


Not via backup/restore. You can export a specific schema or table to Google Cloud Storage, but that's probably not what you're looking for.




回答3:


You can restore the backup to a different instance and then replace the data on the original instance with the data from the backup instance.



来源:https://stackoverflow.com/questions/26103529/backup-and-restore-single-schema-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!