I’m looking for a way to restore a single (or more) table(s) from a backup in GCP.
I’m trying this command :
sudo xbcloud get --storage=google --google-endpoint=storage.googleapis.com --google-access-key= --google-secret-key= --google-bucket= --parallel=10 2022-06-01_15-23-43 ibdata1 DB1/TABLE1 DB2/TABLE2 | xbstream -xv -C /mysql_data/import
The result is :
220601 16:09:44 xbcloud: Successfully connected.
220601 16:09:46 xbcloud: Download completed.
But nothing is downloaded.
I would test this by changing your xbcloud to download first, then use xbstream.
From our documentation:
xbcloud get ... full_backup ibdata1 sakila/payment.ibd > /storage/partial/partial.xbs
xbstream -xv -C /storage/partial < /storage/partial/partial.xbs
Ensure that the xbcloud did indeed download data first. If that doesn’t work, try downloading the entire backup. If that doesn’t work, then there was a problem with your upload that you’ll need to investigate.
Just running this command :
sudo xbcloud get --storage=google --google-endpoint=storage.googleapis.com --google-access-key= --google-secret-key= --google-bucket= --parallel=10 2022-06-01_15-23-43 ibdata1 DB1/TABLE1 DB2/TABLE2
gives the same result as above but no files are downloaded.
Adding > /mysql_data/import/restore.xbs to the command gives an empty file
Downloading the entire backup works without any issue
What about getting just a single file?
ibdata for instance. Also, please add
--verbose to see if there’s anything else going on.
Same result with just ibdata1. The result is an empty file.
Log from verbose run adde
perc.log (27.8 KB)
Just to clarify, this works fine?
xbcloud get --storage=google
--google-bucket=yyy --parallel=10 2022-06-01_15-23-43
That downloads the entire backup?
Yes, downloading the entire backups works as it should
Unfortunately, I have nothing else at this time on the issue and I have not seen any others reporting this problem. If you find you have a repeatable test case, you can open a bug report on our website.
Is there any possibility of testing against an AWS S3 endpoint? If it works from AWS, we can narrow this down to being a GCS-specific issue.
Well, it’s repeatable in the way that it gets the same result every time. It says ‘Download completed’ but no files are actually downloaded.
I’m not sure i can test with AWS since we don’t really use it but i’ll file a bug report in your Jira