[SERVER-8932] Suggestion for creating a snapshot clone of production DB for development purpose Created: 11/Mar/13  Updated: 28/Mar/13  Resolved: 28/Mar/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Somsak Sriprayoonsakul Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

2 replication sets
Mongo shard running in each application server


Participants:

 Description   

Our development team wish to have a development MongoDB deployment that has a snapshot of data, may be 1 day old, of the production data.

From document, it seems that there is not simple way to achieve this. From my understanding there are 2 ways to do this.

1. Create 2 additional VM server to do replication from those 2 production replication sets and assign 'dev' tag to these 2. Have application connect only to replication set with 'prod' tag.

2. Restore data file from daily Bacula backup and create configd, 2xmongod with the same setup as production.

Is there any better way to do this? If possible snapshot into single server would be great.



 Comments   
Comment by Stennie Steneker (Inactive) [ 28/Mar/13 ]

Hi Somsak,

The manual has some good documentation for backup strategies: http://docs.mongodb.org/manual/administration/backups/

If your requirement is a daily backup for development, there are several options depending on your configuration. For example, filesystem/EBS snapshots or mongodump/mongorestore are typical. If you are already doing backups via Bacula, that could also be an option. Replica sets are not appropriate for your use case of sharing data from prod to development, unless your development requirements are readonly. Even then, mixing of data between production and development/staging environments is definitely not best practice and I would encourage you to separate the environments.

I would also note that the SERVER project is for reporting potential bugs or feature suggestions for the MongoDB server. If you have a general questions on using MongoDB, more appropriate forum would be the mongodb-user discussion group or StackOverflow.

Thanks,
Stephen

Comment by Somsak Sriprayoonsakul [ 11/Mar/13 ]

Forgot to mention additional requirements

1. This test database server must be crashable without any effect on production.

2. Dev must be able to write (insert/update) data into this dev servers, so plain replication set might not work in this case.

Generated at Thu Feb 08 03:18:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.