Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD

Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD

Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD

Create (partial) backup of local MongoDB database

If one is developing some web application that uses a MongoDB database and wants to demonstrate the application, one might need some exemplary test data. This data needs to be created beforehand and it might be necessary to whipe the database between the creation of the test data and the demo. Or one might want to check the data into some version control systems for other developers to use this data to explore the application.
The problem now is that one might have the data on a locally running MongoDB and wants to share this data with others or back it up for later uasge.

Create (partial) backup of local MongoDB database

If one is developing some web application that uses a MongoDB database and one wants to demonstrate the application one might need some exemplary test data. This data needs to be created beforehand and it might be necessary to whipe the database between the creation of the test data and the demo. Or one might want to check the data into some version control systems for other developers to use this data to explore the application.
The problem now is that one might have the data on a locally running MongoDB and wants to share this data with others or back it up for later uasge.

Properly configure git before using it

In order to tell git which editor to use for editing the commit messages one simply needs to properly configure git. To achieve this one can either navigate into the local directory of a git repository and call git config core.editor EDITOR where EDITOR is the name of the executable of the editor one wants to use. This solution only configures the editor for the current repository. If one wants to use the same editor for all repositories one needs to use the --global flag.

Unable to edit git commit message with newly installed git

Git allows the user to provied commit messages either via a command line argument or by opening a text editor with a commit message file that the user can freely edit. The obvious benefit of the latter is that one can use all the functionality of the chosen text editor and it is in general easier to write proper commit messages than when simply supplying the message via a command line argument.

Online drawing

This article solves the following challenge: 

How to draw BPMN diagrams easily?

VPN or Tor

There are two solutions for this problem. In both cases you have to find a computer in the actual country where the content is not blocked:

VPN services like Hola, which is also embeddable in a browser too, do exactly that: you connect to a server, which then lets you use a network in th preferred region

How to run a job automatically after Spring boot start

In a normal Spring MVC environment one of the to start a job automatically is define a class in the web.xml which will be initiated after the spring context is load.

One of the advantages of the spring boot is that is does not need any XML file configuration which makes many developers life easier. Spring boot also provides the annotation @Async for the use asynchronous methods.

Pages

Subscribe to TechScreen Revised RSS