2

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.

mentat
  • 198
  • 1
  • 5

3 Answers3

0

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.

Tony Tseng
  • 479
  • 2
  • 6
0

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?

Community
  • 1
  • 1
Kamran
  • 3,397
  • 26
  • 40
0

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.