I have 2 different mongodb databases hosted on different platform as per the development requirements.Our davelopment database is hosted on AWS EC2 instance and production is hosted on Atlas.Here both development and production databases have products collection.
I want to sync this product collection like whenever there is change in production database collection my development should get updated.
I know I can export the data from production using mongodump and import in development db but it requires manual efforts can I make it in any other way.
Related
I've develop a web platform that uses a PostgresSQL database along with Hasura to make GraphQL interface. This platform was deployed on a Google Cloud enviroment: the database is running in a Google Cloud SQL instance, the Hasura and a simple node.js servers are running on Cloud Run instances.
Anyway, since the database should keep growing, I need a secure and reliable way to keep track of changes done in development env to futher deploy it to production database.
The buck of the edits to the database schema are done using the Hasura Console and by now I just need a solution to track changes in data schema made in development enviroment to deploy only the needed changes to production
Reading about migrations I've found out Flyway as a solution to keep of these changes. However, there still some concerns about the implementation of Flyway in the project. But a couple of question arrise:
Is it possible to use the PostgresSQL (pgAdmin) backup generated files as migrations?
How could I make a migration from a development to the production database? Just by adding the remote url from Google Cloud SQL the do the migration?
There's no much need to keep track of changes of the data in production.
Is there a better option to control changes between development and production databases?
If a make frequent schema backup (using pgAdmin Backup tool) and run restore on the production database, it would do what I want?
Is it possible to use the PostgresSQL (pgAdmin) backup generated files as migrations?
I think you are going the wrong way. Flyway is about the migration scripts you execute to propogate DB version. The backup file contains the whole database. If you want to replace the whole database with the new version of it you may simply drop the old one and create the new one, but you will loose data that way. You can of course use flyway to restore the backup for you, but that way you'll get only the version table. If you'll update over several versions, then multiple restores will be performed that is not needed.
How could I make a migration from a development to the production database? Just by adding the remote url from Google Cloud SQL the do the migration?
I tried google'ing (entered "Google Cloud SQL flyway") and the first result pointed me to Umberto D'Ovido post Setup Flyway with Google Cloud SQL I'm sure with a little effor you'll find the instructions.
I would like to know how to update an existing database from another database in mongodb ... but previously a little of context.
I've created an app with strapi and mongodb ( more precisely with mongo atlas) and I'm using 2 environments, development and production(with a development and production database). At the beginning, i've created the development database and i copied/cloned this database to another database with this command (previously I created the db file with mongodump)
mongorestore --uri="mongodb+srv://<username>:<password>#<cluster-url>" --archive="app-development.db" --nsFrom='app-development.*' --nsTo='app-production.*
After creating this database i carried on with my develop into the development database, and now i would like to import the development database into the production database...but i got the error continuing through error: E11000 duplicate key error collection
So I don't know how can i re-import the databases, and also i would like to know if this way is a good practice or i should do it in a different way
We have been planning migrating from shared development database to local database for each developer. Installing the database, schema and initial data should be automated and platform independent, and each developer would point his application server and DBMS to this local database instead of a shared one, to freely experiment with the schema without fear of breaking others work. Database in question is Oracle.
Database stuff is of course source controlled, and each developer should easily upgrade to the latest version. Ideal is, each developer runs some kind of platform independent container, which on boot is configured to mirror the QA database by fetching the latest schema and scripts from the source control. It should be easy resetting to the last stable state, but also preserve local changes in some persistent storage in the case of container failure.
I have been considering technologies like Vagrant, Docker and/or Ansible to ship and automate the local database setup and configuration in a platform independent way. However, I read Oracle Database doesn't officially support Docker. What does that mean? Can't I build custom docker with Oracle Database binary?
Would it be better to install Oracle database using vagrant Ansible provisioner, due to the uncertain docker support? Would docker just bring unnecessary layer of complexity, as Vagrant already provides the virtualization, and Ansible could handle the setup and configuration?
I would like to hear some real life war stories about implementing platform independent database per developer pattern.
Oracle Database doesn't officially support Docker. just means that
there is no official docker image for oracle database for now. But you
can always pull a base image like ubuntu and install your database.
Once you have setup the whole environment on top of the base image, you can push the image you created into a private repository and share it.
Private repository serveice with version control is provided by dockerhub, GCP, AWS etc...
Once everyone has docker deamon running in their systems, they can just pull and deploy the image as a container.
Scenario:
Development Environment: Trial License for Sitefinity
Staging Environment: Purchased License from Sitefinity (but without Sync Module).
I am working on a project. Actually I developed some code & other contents (using Sitefinity's Admin panel including Templates, Pages, Images) locally.
Now I want to Migrate/Sync the new changes to staging environment.
But Staging environment License dosen't has the facility to Sync.
I tried to use visual studio 2013 data comparison tool But using this I had PageId conflict. I debugged this issue found that some ID's ware different on both Databases, sply for Ownr field.
I want to know if I change this Field value & copy new records in Staging DB will solve my problem.
Or there's any other way to integrate my changes to Staging Database.
Thanks
If you haven't made changes to the staging environment, you could take a backup of your local database and reinstate it over the staging database. Its sounds like all your changes (templates, pages and images) are going to be stored in the database by default. Any configuration changes you might have made locally are going to be stored in the App_Data/Sitefinity/Configuration folder, so you might want to publish your local project and use a tool like Beyond Compare to view those differences and migrate those over to staging as well.
I agree, without the purchase of the Site Sync license keeping different Sitefinity environments in sync is a major headache. If I'm doing development work on a Sitefinity site that is in production, I end up having to recreate the page and db changes on that server once the changes are ready for the live environment.
I am working on a phonegap project to build a cross platform mobile app, and came to know from a website that the app's database can be deployed/built with "database.com".
The procedure is well explained but I have one question -
how to sync the database available on database.com with a database on a local server?
i.e. for e.g., if a client has his database (of his desktop application) on his local server and he requires a mobile app of the same now, what is the procedure to be followed in "database.com" to sync his server's database with the database on "database.com"?
PS: I need to use "database.com" for my database because I want to maintain it on cloud, and I do not have capability to maintain a local server.
You might need a service for data syncing if it is to be more than once. I work on a project that does exactly this.
www.overcast-suite.com
Otherwise, model your tables to Salesforce Custom Objects, export the data on the local server to CVS and use the Data Loader to import.