yes you can , we do that and its way faster.
its possible through Rest API.
for example:
curl -o /dev/null -w'%{http_code}' -X POST https://www.googleapis.com/sql/v1beta4/projects/${TARGET_PROJECT}/instances/${SQL_TARGET_INSTANCE}/restoreBackup -H "Authorization: Bearer ${TOKEN}"
-H 'Content-Type: application/json' -d '{"restoreBackupContext": {"backupRunId":"${SOURCE_BACKUP_ID}","project":"${SOURCE_PROJECT}","instanceId": "${SQL_SOURCE_INSTANCE}"}}'
where:
TARGET_PROJECT = the project you want to restore backup to
SQL_TARGET_INSTANCE = the sql instance you want to do restore on
TOKEN = authentication token
SOURCE_BACKUP_ID=the backup id from the source instance you want to use for the restore
SOURCE_PROJECT=the project of the sql instance which were backed up
SQL_SOURCE_INSTANCE=the sql instance which were backed up
hope that's clear enough.
Chen
On Wed, Mar 25, 2020 at 5:08 AM abhishek singh <abhishek.singhdba@gmail.com> wrote:
Hi,--Our Production Db is approx 1.3 TB and we do restore PROD to lower env using export/import. This is takes approx 22-26 hrs.Is there a way if i can restore a cloudsql managed backup across different projects ?ThanksAbhi
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/08330703-74e9-4bcf-80cc-8060893fa998%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAA63%3De6N6f2TNWSS_rTxYawKBH8LYLVHa_nfcswV9-Y0GwO%2Bkg%40mail.gmail.com.
No comments:
Post a Comment