dokku / dokku-mongo

a mongo plugin for dokku
MIT License
177 stars 32 forks source link

Backups cannot be imported #95

Closed jlcastillo closed 6 years ago

jlcastillo commented 6 years ago

There are several problems:

1) Backups have a TGZ format, but mongo:import only supports TAR. 2) The structure of folders and collections inside the TGZ are wrong, and mongo:import doesn't understand them.

josegonzalez commented 6 years ago

What backups are you talking about? The import subcommands for service plugins are meant to be used in conjunction with the respective export subcommands. In this case, the format we use for exports is not tgz unless I am mistaken.

jlcastillo commented 6 years ago

I'm talking about the backups that you make with mongo:backup. Those cannot be imported with:

dokku mongo:import service < backup_file

they instead need to be imported with something like:

tar zxf backup_file && dokku mongo:import service < backup_file/export

it would make sense to backup with the same format of mongo:export, or at least document how to restore backups.

josegonzalez commented 6 years ago

Yeah I think the documentation route is the way to go here as - iirc - the backups also include configuration files etc., which may not make too much sense to "import".

josegonzalez commented 6 years ago

This issue was moved to dokku/dokku-redis#100