In my cloud sql instance, I have many databases. I want to export one database (DB1) and import that to another database with different name (DB2) in the same instance.
Also, database DB2 is pre-created.
When I try to do it using
for Export:
gcloud sql export sql my_instance gs://my_bucket/db-backup.sql --database=DB1 --project=my_project
for import
gcloud sql import sql my_instance gs://my_bucket/db-backup.sql --database=DB2 --project=my_project
The command executes successfully but I am not able to see any tables in DB2.
Expected: the database DB2 should be populated with the data of DB1
Actual: I don’t see any tables post import.
Need help and understanding as to what am I doing wrong here and how to achieve what I am aiming for.
Thanks