I Want to Do
Restore my backup data by using bulk loader to a new instance of Dgraph (v20.11.0)
What I Did
- I started dgraph zero then alpha via docker containers
- I get into dgraph zero container and executed the command:
dgraph bulk -f /data/g01.rdf.gz -s /data/g01.gql_schema
the output was:
[Decoder]: Using assembly version of decoder
Page Size: 4096
I0118 13:11:57.979265 71 init.go:107]
Dgraph version : v20.11.0
Dgraph codename : tchalla
Dgraph SHA-256 : 8acb886b24556691d7d74929817a4ac7d9db76bb8b77de00f44650931a16b6ac
Commit SHA-1 : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch : HEAD
Go version : go1.15.5
jemalloc enabled : true
For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph , visit http://discuss.dgraph.io.
Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.
I0118 13:11:57.979769 71 util_ee.go:126] KeyReader instantiated of type <nil>
Encrypted input: false; Encrypted output: false
{
"DataFiles": "/data/g01.rdf.gz",
"DataFormat": "",
"SchemaFile": "/data/g01.gql_schema",
"GqlSchemaFile": "",
"OutDir": "./out",
"ReplaceOutDir": false,
"TmpDir": "tmp",
"NumGoroutines": 1,
"MapBufSize": 2147483648,
"PartitionBufSize": 4194304,
"SkipMapPhase": false,
"CleanupTmp": true,
"NumReducers": 1,
"Version": false,
"StoreXids": false,
"ZeroAddr": "localhost:5080",
"HttpAddr": "localhost:8080",
"IgnoreErrors": false,
"CustomTokenizers": "",
"NewUids": false,
"ClientDir": "",
"Encrypted": false,
"EncryptedOut": false,
"MapShards": 1,
"ReduceShards": 1,
"EncryptionKey": null,
"BadgerCompression": 1,
"BadgerCompressionLevel": 0,
"BlockCacheSize": 46976204,
"IndexCacheSize": 20132659
}
Connecting to zero at localhost:5080
2021/01/18 13:11:57 while lexing
...
..
.
(MY SCHEMA FILE PRINTED OUT)
.
..
...
# Dgraph.Authorization ....
at line 18 column 20: Invalid schema. Unexpected "
github.com/dgraph-io/dgraph/lex.(*Lexer).ValidateResult
/ext-go/1/src/github.com/dgraph-io/dgraph/lex/lexer.go:199
github.com/dgraph-io/dgraph/schema.Parse
/ext-go/1/src/github.com/dgraph-io/dgraph/schema/parse.go:443
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.readSchema
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/loader.go:185
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.newLoader
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/loader.go:139
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.run
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/run.go:285
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.init.0.func1
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/run.go:49
github.com/spf13/cobra.(*Command).execute
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
/usr/local/go/src/runtime/proc.go:204
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1374
github.com/dgraph-io/dgraph/x.Check
/ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.readSchema
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/loader.go:186
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.newLoader
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/loader.go:139
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.run
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/run.go:285
github.com/dgraph-io/dgraph/dgraph/cmd/bulk.init.0.func1
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/run.go:49
github.com/spf13/cobra.(*Command).execute
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
/usr/local/go/src/runtime/proc.go:204
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1374
the message: at line 18 column 20: Invalid schema. Unexpected "
refers to this part:
type UserAuth @auth(
query: { rule: "{$name: { eq: \"Prllel\" } }" },
It seems like is not accepting quotes but when I submit my schema by curl it does it without problems. the backup files (data and schema) was generated with a previous dgraph instance with version (v20.07.1) but I don’t really think the version differences is the problem.
Is something in the execution to import my data that I am doing wrong?
Thanks in advance