Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Mongodump output
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Martinus Martinus  
View profile  
 More options Oct 22 2012, 10:29 pm
From: Martinus Martinus <martinus...@gmail.com>
Date: Tue, 23 Oct 2012 10:28:59 +0800
Local: Mon, Oct 22 2012 10:28 pm
Subject: Mongodump output

Hi,

Is there any way to make my mongodump output to be send directly into
remote machine folder? For example I have two machines A and B, I want to
put my mongodump from machine A directly to machine B "/backup" folder what
should I put after --out parameter?

mongodump --host machine_A --port 10001 --out ?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre de Frere  
View profile  
 More options Oct 23 2012, 1:26 am
From: Andre de Frere <andre.defr...@10gen.com>
Date: Mon, 22 Oct 2012 22:26:38 -0700 (PDT)
Local: Tues, Oct 23 2012 1:26 am
Subject: Re: Mongodump output

Hi,

Could you just run mongodump from machine_b?  As long as you can connect to
machine_a from machine_b (which I assume you can, if you are trying to drop
files there) you could just run the command you have given from machine_b
and give the --out as the "/backup" directory.

Regards,
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martinus Martinus  
View profile  
 More options Oct 23 2012, 2:47 am
From: Martinus Martinus <martinus...@gmail.com>
Date: Tue, 23 Oct 2012 14:47:17 +0800
Local: Tues, Oct 23 2012 2:47 am
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Andre,

Thanks for your answer. Yeah, that could also be a solution. And if I have
2 shards where each shard has 3 replicaSets, can I do this to make
mongodump for my shard 1 and shard 2 (without lock, because mongodump can't
be used when the database is locked) :

mongodump --host shard1 --port 10001 --out /backup/mongodump1 --oplog

mongodump --host shard2 --port 10004 --out /backup/mongodump2 --oplog

where 10001 and 10004 are each the master node for each replicaSets. And
for config server, will it be better if I do :

mongodump --host config1 --port 20001 --db config --out /backup

or

mongodump --dbpath /data/config1 --out /backup

Thanks.

Best regards,

Martinus

On Tue, Oct 23, 2012 at 1:26 PM, Andre de Frere <andre.defr...@10gen.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre de Frere  
View profile  
 More options Oct 25 2012, 12:15 am
From: Andre de Frere <andre.defr...@10gen.com>
Date: Wed, 24 Oct 2012 21:15:03 -0700 (PDT)
Local: Thurs, Oct 25 2012 12:15 am
Subject: Re: Mongodump output

Hi Martinus,

You are able to take a mongodump from the primaries while they are running
if you wish, but you should be aware of the load that this process will put
on your node.  It might be better to take the backups from a secondary
node, or a secondary hidden node.  If you back up from secondaries, not
only will there be less pressure on your primary but you will also be able
to lock the secondaries if needed.  If necessary you could even stop the
process on the secondary entirely.

You should also be aware that you must stop the balancer (and wait for
chunk migrations to finish) before doing any of the backups.  If you skip
this step, then you might find duplicate or spurious data.

Either of your techniques for backing up the config DB should be okay, as
long as the balancer is off at the time.

Regards,
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martinus Martinus  
View profile  
 More options Oct 25 2012, 3:23 am
From: Martinus Martinus <martinus...@gmail.com>
Date: Thu, 25 Oct 2012 15:23:10 +0800
Local: Thurs, Oct 25 2012 3:23 am
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Andre,

Thanks for your answer. I remember if I put a lock on the secondary node
and shut it down, I can't use mongodump to make a backup out of it. Can you
explain more about secondary hidden node? and after I stop the balancer
from mongos, how do I know if the chunk migrations is already finish or not
before I do the backup process on shard servers? Because currently I just
followed the steps explained  in mongodb website : 1. stop the balancer and
2. mongodump the config db.

Thanks.

On Thu, Oct 25, 2012 at 12:15 PM, Andre de Frere <andre.defr...@10gen.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre de Frere  
View profile  
 More options Oct 26 2012, 12:39 am
From: Andre de Frere <andre.defr...@10gen.com>
Date: Thu, 25 Oct 2012 21:39:19 -0700 (PDT)
Local: Fri, Oct 26 2012 12:39 am
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Martinus,

You can still use mongodump to dump databases even if the secondary is
down.  This is done through the --dbpath option which allows mongodump to
connect directly to the db files without the mongod process.  You can find
more information at the
documentation: http://docs.mongodb.org/manual/reference/mongodump/

A hidden node is one that has a priority of 0 (so it cannot be elected
primary) and also cannot have client read requests directed to it.  It will
still take part in elections, even if it cannot become primary.  You can
find more information in the documentation here:
 http://docs.mongodb.org/manual/administration/replica-sets/#replica-s...

You can check the locks collection in the config database to see if the
balancer is currently doing a migration.  In 2.2 this is taken care of with
the "sh.stopBalancer()" shell function, but in prior versions you can do
something similar with:

while (db.locks.findOne({_id: "balancer", state: {$ne: 0}}) != null) {
sleep(1000); }

Regards,
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martinus Martinus  
View profile  
 More options Oct 26 2012, 2:55 am
From: Martinus Martinus <martinus...@gmail.com>
Date: Fri, 26 Oct 2012 14:55:26 +0800
Local: Fri, Oct 26 2012 2:55 am
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Andre,

Thank you for your complete explanations. I already use mongo 2.2.0, so if
I do sh.stopBalancer() will it be the same as doing :

1. sh.setBalancerState(false) or
2. use config
    db.settings.update({ _id : "balancer" }, { $set : { stopped : true }},
true);

Thanks.

Best regards,

Martinus

On Fri, Oct 26, 2012 at 12:39 PM, Andre de Frere <andre.defr...@10gen.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre de Frere  
View profile  
 More options Oct 28 2012, 5:40 pm
From: Andre de Frere <andre.defr...@10gen.com>
Date: Sun, 28 Oct 2012 14:40:44 -0700 (PDT)
Local: Sun, Oct 28 2012 5:40 pm
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Martinus,

The two commands you have listed are functionally equivalent.  

If you have a look at the sh.stopBalancer() command you will see that it
does sh.setBalancerState(false) (which is equivalent of
db.getSiblingDB("config").settings.update({_id:"balancer"},{$set:{stopped:t rue}},true)
) and then also waits for the locks to resolve.

The waiting for the locks to resolve is the new functionality in
sh.stopBalancer() from 2.2.

Regards,
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martinus Martinus  
View profile  
 More options Oct 29 2012, 12:13 am
From: Martinus Martinus <martinus...@gmail.com>
Date: Mon, 29 Oct 2012 12:13:14 +0800
Local: Mon, Oct 29 2012 12:13 am
Subject: Re: [mongodb-user] Re: Mongodump output

Hi Andre,

Thanks for your helpful explanation.

Best regards,

Martinus

On Mon, Oct 29, 2012 at 5:40 AM, Andre de Frere <andre.defr...@10gen.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »