Closed bradwbradw closed 6 years ago
I have this issue whether I try to download the export via ssh as per @bradwbradw 's example, or whether I create the file on the server first and try to execute the command there.
$ ssh user@example.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
when opening the tar file in a text editor, you can see that the command's verbose output has been concatenated to the top
2017-05-24T19:36:24.433+0000 writing xyz.SpaceSong to 2017-05-24T19:36:24.434+0000 writing xyz.Song to 2017-05-24T19:36:24.435+0000 writing xyz.dj to 2017-05-24T19:36:24.436+0000 done dumping xyz.RoleMapping (11 documents) ...
So the tar file is dirty because it contains all this text that would normally just appear in the console when running
dokku mongo:export
while SSH'd in (not remote command)