Hi,

I am putting together scripts to backup / restore data from the datastore. 
These backup / restore scripts offer the possibility to manipulate data at 
the namespace level which is not possible at this stage with the standard 
datastore admin features.

The process is currently the following :

- On a regular basis, scripts will backup each namespace through the 
following command ($1 = namespace, $2=Kind) :

appcfg.py download_data --secure --email=$BACKUP_USERID 
--filename=data_$1_$2.csv --kind=$2 --url=$WEBSITE --namespace=$1 --passin 
<<-EOF
$BACKUP_PASSWORD
EOF

- If a restore for a given namespace is required, the following would be 
done
  --> Delete all the entities in a namespace
  --> Restore through the following command :

appcfg.py upload_data --secure --email=$BACKUP_USERID 
--filename=data_$1_$2.csv --kind=$2 --url=$WEBSITE --namespace=$1 --passin 
<<-EOF
$BACKUP_PASSWORD
EOF

My questions would be the following : 
--> Is there a risk to have key duplicates after the data has been deleted 
then restored in the namespace ? 
--> I read in other posts about the options (--dump and --restore). What is 
the effect of these options and is it correct that these options do not 
exist anymore ?
--> Is this the right way of backup / restore for one namespace ?

Thanks,

Hugues







> Hi Jeff,
>
> Maybe one more question related to restoring entities created with
> objectify. What I am trying to do is to restore the data for one
> namespace. The process would be the following :
>
> 1) Use Datastore admin tool to backup the overall Datastore to prevent
> from global problems
>
> 2) On top of the datastore admin tool use the bulkuploader tool to
> backup by namespace using the command proposed by Dennis (see above)
>
> 3) If needed restore for one namespace, I was planning to
>   --> 1) delete all the entities for that namespace
>   --> 2) use the bulkuploader to restore in that namespace
>
> My question would be related to the uniqueness of the keys after the
> restore. Is there a risk that some keys would be duplicate when the
> users will create new entities in that namespace. That is, how would
> the datastore know that some entities have been deleted then
> restored ?
>
> Thanks a lot in advance,
>
> Hugues

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/QVM2nfB-2Z8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to