-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-12-02 16:39, roger peppe wrote: > On 2 December 2013 11:40, Ian Booth <[email protected]> > wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >>> >>> I don't fully understand the difference from mongoexport vs >>> mongodump (it looks like dump generates a binary snapshot >>> compatible with restore, while export/import generate text >>> representations of the data.) >>> >>> I'd *really* like us to stick with *one* of them as the >>> recommended method for backing up the content. >>> >> >> Both export and dump are used by the Juju backup tool. dump is >> used to do a full bson export of the database and is required for >> a database recovery. export is used to write to json the >> environment settings document so that there is a human readable >> copy of the full environment settings contained in the backup >> tarball. > > ISTM that the mongo command could be used to similar effect, as > John suggests, couldn't it? Then we would not need mongexport at > all. >
For what we are using this page: http://stackoverflow.com/questions/11255630/how-to-export-all-collection-in-mongodb has something like: mongo --eval 'printjson(db.getCollectionNames())' We can easily change the internal one to something like db.find('session') or whatever it needs to be. Now, we wouldn't need 'mongo' otherwise, but I think if we have to pick a tool 'mongo' is more generally useful, and it doesn't bundle v8 so it is a smaller binary as well. So +1 to switching to 'mongo' instead of 'mongoexport'. John =:-> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Cygwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKcgaMACgkQJdeBCYSNAAMkZgCfUppZVL16+mkARijKDfwIm7cp NAkAoLKxYwuUcTDtrIxdRNBiUPiR6BwD =AuBf -----END PGP SIGNATURE----- -- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
