Backing up in one and restoring in another Google App Engine application using Cloud Storage?

My goal was to duplicate the Google App Engine application. I created a new application and downloaded all the necessary code from the source application (python). Then I downloaded the previously created backup files from the cloud storage of the source application (first I downloaded these files to the PC and uploaded the files to the target application's GCS application)

After that, I tried to restore data from these files using the "Import backup data" button. A backup file has been created, and I can add it to the list of available backups. But when I try to recover, I get the error message: "There was a problem with the tasks. Error:" Could not read "

I also tried to load these files into the original application, and I was able to restore them using the same procedure so that the files would not be damaged.

I know that there are other ways to copy data between applications, but I wanted to use this method. If, for example, my Google account is hacked and I can’t access my original application data, but I have all the backup data on my hard drive. Then I can just create a new application and copy all the data into a new application ...

Has anyone encountered a similar problem before and may have found some solution?

Thanks!

+8
python google-app-engine
source share
2 answers

Yes!! What you are trying to do is impossible. The reason is that in the backup files there are absolute links to the original location of the backup (bucket). Therefore, moving files to another location of the GCS will not work.

Instead, you need to leave the backup files in the original GCS bucket and give your new project read access to this folder. This is done in the "Edit bucket" options. eg. Add: Project - Owners-12345678 - Reader

Now you can import from this bucket into your new project in the "Import Bucket Information".

+4
source share

Given this message, I assume that the target application does not have read access to the bucket where the backup is stored. Add the application to allowed users in this bucket before creating a backup so that the backup objects inherit permission.

+1
source share

All Articles