Discussion:
[mongodb-user] CUSTOM SCRIPT TO BACKUP MONGODB
Kenneth Odo
2018-10-30 13:55:21 UTC
Permalink
Hello Great people,

I am seeking for a script that can help me take a backup of the MongoDB
environments.

We currently do the backup using a third party backup solution but manually
have to stop the replication and balancer on each shard before the backup
is taken for a consistent data backup. The process is not effective and I
am seeking to find a way to automate the process.

The process may involve the below:


- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()


Upon completion of the backup,


- start balancer
- start replication


Anyone with a solution or ideas should please assist.

Best regards,

Ken
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz8Huxdu%2B-DQDxtdiJbz_MMVJ9_6YcvjMd%2BUPojzgjhb6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Odo
2018-10-31 15:20:33 UTC
Permalink
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the MongoDB
environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Bob Cochran
2018-10-31 15:55:53 UTC
Permalink
Hi Ken,

I personally think you need an on-site person who can assess your installation and hardware as a part of providing a custom backup solution. There are numerous details you are not disclosing here. An obvious one is whether your server is running on a Microsoft Windows or Unix/Linux platform. Also where is your deployment located and are there multiple physical locations involved. That should be enough to interest people with the right skills. I think the book “Unix Backup and Recovery” by Preston might be worth reading. It is terribly out of date now but Preston shows how complicated good backup strategies are and indeed how they need to be. Curtis also has, or had, a website devoted to backup issues. You ought to check into it.

There are many details about your deployment that need to be discussed with a developer. You need someone close to your location whom you can talk to and show her right onsite. You also need a test system to test the code on. It isn’t as simple as writing a script that gets emailed to you.

Thanks so much

Bob
Post by Kenneth Odo
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the MongoDB environments.
We currently do the backup using a third party backup solution but manually have to stop the replication and balancer on each shard before the backup is taken for a consistent data backup. The process is not effective and I am seeking to find a way to automate the process.
Check status of the database: rs.status()
Check which is master db.isMaster()
Stop the balancer sh.stopbalancer()
Stop replication fsyncLock()
Upon completion of the backup,
start balancer
start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Odo
2018-10-31 17:07:16 UTC
Permalink
Thank you Bob for your response

My environment is located in two locations and they are running on Oracle
Linux Server.

There is a test system already available but for someone close to me, it's
what I do not know how to handle.

Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be discussed
with a developer. You need someone close to your location whom you can talk
to and show her right onsite. You also need a test system to test the code
on. It isn’t as simple as writing a script that gets emailed to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz8_3Tk-My1mwk0CthjGK%2BeFPR-KKV6u0GjLYq4RPWDf3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jorge Meirim
2018-11-08 15:04:02 UTC
Permalink
Hi Kenny,

Are you using lvm on your file system? Is your mongodb data in only FS or
more than one but contained on the same volume group?

Regards,
Jorge
Post by Kenneth Odo
Thank you Bob for your response
My environment is located in two locations and they are running on Oracle
Linux Server.
There is a test system already available but for someone close to me, it's
what I do not know how to handle.
Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be discussed
with a developer. You need someone close to your location whom you can talk
to and show her right onsite. You also need a test system to test the code
on. It isn’t as simple as writing a script that gets emailed to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Odo
2018-11-08 15:24:16 UTC
Permalink
Hello Jorge,


Yes, we are using lvm on file system and the MongoDB data is on the same
FS.

Thanks,

Ken
Post by Jorge Meirim
Hi Kenny,
Are you using lvm on your file system? Is your mongodb data in only FS or
more than one but contained on the same volume group?
Regards,
Jorge
Post by Kenneth Odo
Thank you Bob for your response
My environment is located in two locations and they are running on Oracle
Linux Server.
There is a test system already available but for someone close to me,
it's what I do not know how to handle.
Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be discussed
with a developer. You need someone close to your location whom you can talk
to and show her right onsite. You also need a test system to test the code
on. It isn’t as simple as writing a script that gets emailed to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz_iux_3rjPW2WuOwj3wRAmfg9pYzoQGDiJNZ8WgUBET0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jorge Meirim
2018-11-13 14:44:41 UTC
Permalink
Hi Ken,

I'm producing and will make available a bunch of python scripts (aka SW)
scripts to make mongodb backups using lvm snapshots and pipe the result
thru zbackup to an Nfs mount point.
Currently doing backups of replica sets but soon I will extend it to Shard
Servers.

Stay tuned
Regards
Jorge
Post by Kenneth Odo
Hello Jorge,
Yes, we are using lvm on file system and the MongoDB data is on the same
FS.
Thanks,
Ken
Post by Jorge Meirim
Hi Kenny,
Are you using lvm on your file system? Is your mongodb data in only FS or
more than one but contained on the same volume group?
Regards,
Jorge
Post by Kenneth Odo
Thank you Bob for your response
My environment is located in two locations and they are running on
Oracle Linux Server.
There is a test system already available but for someone close to me,
it's what I do not know how to handle.
Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be discussed
with a developer. You need someone close to your location whom you can talk
to and show her right onsite. You also need a test system to test the code
on. It isn’t as simple as writing a script that gets emailed to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the
MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d5cc0646-c825-43b9-a4af-0eb598b2eda3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Odo
2018-11-13 15:26:15 UTC
Permalink
Thank you.

I await your revert.

Regards,
Post by Bob Cochran
Hi Ken,
I'm producing and will make available a bunch of python scripts (aka SW)
scripts to make mongodb backups using lvm snapshots and pipe the result
thru zbackup to an Nfs mount point.
Currently doing backups of replica sets but soon I will extend it to Shard
Servers.
Stay tuned
Regards
Jorge
Post by Kenneth Odo
Hello Jorge,
Yes, we are using lvm on file system and the MongoDB data is on the same
FS.
Thanks,
Ken
Post by Jorge Meirim
Hi Kenny,
Are you using lvm on your file system? Is your mongodb data in only FS
or more than one but contained on the same volume group?
Regards,
Jorge
Post by Kenneth Odo
Thank you Bob for your response
My environment is located in two locations and they are running on
Oracle Linux Server.
There is a test system already available but for someone close to me,
it's what I do not know how to handle.
Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be discussed
with a developer. You need someone close to your location whom you can talk
to and show her right onsite. You also need a test system to test the code
on. It isn’t as simple as writing a script that gets emailed to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the
MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/d5cc0646-c825-43b9-a4af-0eb598b2eda3%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/d5cc0646-c825-43b9-a4af-0eb598b2eda3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz_rrOW93Sh6UvWM6DdO%3DJRMafhVV_CuVA%2BfDnm5H_ZYnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Odo
2018-12-04 11:40:32 UTC
Permalink
Hi Jorge,

Do you have any update to give at this moment?
Post by Kenneth Odo
Thank you.
I await your revert.
Regards,
Post by Bob Cochran
Hi Ken,
I'm producing and will make available a bunch of python scripts (aka SW)
scripts to make mongodb backups using lvm snapshots and pipe the result
thru zbackup to an Nfs mount point.
Currently doing backups of replica sets but soon I will extend it to
Shard Servers.
Stay tuned
Regards
Jorge
Post by Kenneth Odo
Hello Jorge,
Yes, we are using lvm on file system and the MongoDB data is on the same
FS.
Thanks,
Ken
Post by Jorge Meirim
Hi Kenny,
Are you using lvm on your file system? Is your mongodb data in only FS
or more than one but contained on the same volume group?
Regards,
Jorge
Post by Kenneth Odo
Thank you Bob for your response
My environment is located in two locations and they are running on
Oracle Linux Server.
There is a test system already available but for someone close to me,
it's what I do not know how to handle.
Regards,
Post by Bob Cochran
Hi Ken,
I personally think you need an on-site person who can assess your
installation and hardware as a part of providing a custom backup solution.
There are numerous details you are not disclosing here. An obvious one is
whether your server is running on a Microsoft Windows or Unix/Linux
platform. Also where is your deployment located and are there multiple
physical locations involved. That should be enough to interest people with
the right skills. I think the book “Unix Backup and Recovery” by Preston
might be worth reading. It is terribly out of date now but Preston shows
how complicated good backup strategies are and indeed how they need to be.
Curtis also has, or had, a website devoted to backup issues. You ought to
check into it.
There are many details about your deployment that need to be
discussed with a developer. You need someone close to your location whom
you can talk to and show her right onsite. You also need a test system to
test the code on. It isn’t as simple as writing a script that gets emailed
to you.
Thanks so much
Bob
Any help will be appreciated
Post by Kenneth Odo
Hello Great people,
I am seeking for a script that can help me take a backup of the
MongoDB environments.
We currently do the backup using a third party backup solution but
manually have to stop the replication and balancer on each shard before the
backup is taken for a consistent data backup. The process is not effective
and I am seeking to find a way to automate the process.
- Check status of the database: rs.status()
- Check which is master db.isMaster()
- Stop the balancer sh.stopbalancer()
- Stop replication fsyncLock()
Upon completion of the backup,
- start balancer
- start replication
Anyone with a solution or ideas should please assist.
Best regards,
Ken
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAByhRz-GF6mFweKZ0F5rzGwEXmaw9frR44i1dGcpKv0h4L2Oww%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com
<https://groups.google.com/d/msgid/mongodb-user/EBE07631-0AB2-4C60-BA04-3AD6B6808865%40gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/54a889f5-3700-44a5-a4fd-5e1ffe4d884e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/d5cc0646-c825-43b9-a4af-0eb598b2eda3%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/d5cc0646-c825-43b9-a4af-0eb598b2eda3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAByhRz_6oDULjHHdY2xjb%2B%3DBKQpUw3vXtQDbPxefQy%2BS22bKEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...