Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backup in one and restore in another Google App Engine application by using Cloud Storage?

My goal was to duplicate my Google App Engine application. I created new application, and upload all needed code from source application(python). Then I uploaded previously created backup files from the Cloud Storage of the source application (first I downloaded those files to PC and than uploaded files to GCS bucket of the target app)

After that I tried to restore data from those files, by using "Import Backup Information" button. Backup information file is founded and I can add it to the list of available backups. But when I try to do restore I receive error: "There was a problem kicking off the jobs. The error was: Backup not readable"

Also I tried to upload those files back to original application and I was able to restore from them, by using the same procedure, so the files are not corrupted.

I know there are another methods of copying data between applications, but I wanted to use this method. If for example, my Google account is being hacked and I can not access my original application data, but I have all backup data on my hard drive. Then I can simply create new app and copy all data to the new app...

Has anyone before encountered with the similar problem, and maybe found some solution?

Thanks!

like image 979
Nemanja Avatar asked Dec 16 '14 22:12

Nemanja


2 Answers

Yes!! What you are trying to do is not possible. The reason is that there are absolute references in the backup files to the original backup location (bucket). So moving the files to another GCS location will not work.

Instead you have to leave the backup files in the original GCS bucket and give your new project read access to that folder. That is done in the "Edit bucket permissions" option. eg. add: Project - owners-12345678 - Reader

Now you are able to import from that bucket in your new project in "Import Bucket Information".

like image 167
Jens Avatar answered Oct 01 '22 16:10

Jens


Given the message, my guess is that the target application has no read access to the bucket where the backup is stores. Add the application to the permitted users to that bucket before creating the backup so that the backup objects will inherit the permission.

like image 36
Gabriel Avatar answered Oct 01 '22 17:10

Gabriel