Binary backup of badger files in Dgraph

I am not sure, why you would want to backup the badger DB, because DGraph comes with a built-in backup feature that dumps the database in a json like format.

I’ve achieved good results by running this query:

mutation { 
    export(input: {
        destination: /path/to/backup/dir/ 
        }) { 
    response { 
        message code 
        } 
    } 
}

you can post this query as json to the admin route http://localhost:8080/admin

Hope this helps