문제

dokku-mongo export Database command is showing error "This does not look like a tar archive"

$ ssh svuser@dbexample.com
$ dokku mongo:export database > backup.tar
$ tar -xfv backup.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
도움이 되었습니까?

해결책

$ ssh svuser@dbexample.com
$ dokku mongo:export database > backup.tar
$ tar -xfv backup.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

As per github dukku-mongodb documentation by @josegonzalez here I don't think the export is actually a tar. The readme we have is wrong, but if you run dokku mongo:help export, you'll see the correct usage.

Here's what dokku mongo:help export says:

export a dump of the MongoDB service database

arguments:

service   service to run command against

examples:
by default, datastore output is exported to stdout

dokku mongo:export lolipop

you can redirect this output to a file

dokku mongo:export lolipop > lolipop.dump

export a dump of the MongoDB service database
arguments:

service   service to run command against

examples:
by default, datastore output is exported to stdout

dokku mongo:export lolipop

you can redirect this output to a file

dokku mongo:export lolipop > lolipop.dump

For further your ref here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top