Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Easy Automated Docker Volume Backups That Are Database Friendly

I recently picked up a Beelink EQR6 Mini PC to reduce some of the Docker stress on my aging Synology NAS. Since my Synology used the Btrfs filesystem, I never had to worry about file locks and corruption during a backup because that particular file system used copy-on-write (CoW). However, since I decided to use Ubuntu Server on my Mini PC and neglected choosing which filesystem I wanted to use, I ended up with ext4.

Here’s the problem though.

The ext4 filesystem does not support copy-on-write. This means that if I tried to make backups of my Docker volumes, I’d run the risk of file corruption if those files were in use at the time of backup. This is particularly more of a problem with Docker volumes that contain SQLite databases with write-ahead log (WAL) or databases in general.

There’s good news though! There are a few automated solutions for safe backups of Docker volumes that can be used with minimal effort.

Read More

Migrating Your Content Management System (CMS) Assets With MongoDB and Node.js

Content platforms evolve as business strategies shift. At MongoDB, we embraced external publishing platforms like Dev.to, Medium, The Polyglot Developer, etc. to better engage developer communities, requiring us to redistribute content while maintaining our existing CMS data in MongoDB.

To support our multi-platform publishing strategy, we created a system to publish content between our MongoDB CMS and external platforms. As a result, we needed to migrate the content we had in our CMS to its new home. The migration process included exporting the written content stored in MongoDB and downloading a copy of the media assets that were stored on third-party servers.

In this tutorial, we’ll explore the export process to get the job done with as little friction as possible.

Read More

Django MongoDB Backend Quickstart

Interested in diving into our Django MongoDB Backend integration? Follow along with this quickstart to create a Django application, connect that application to a MongoDB deployment, ensure your deployment is hosted on MongoDB Atlas, and interact with the data stored in your database using simple CRUD operations.

Read More

How to Make a RAG Application With LangChain4j

Retrieval-augmented generation, or RAG, introduces some serious capabilities to your large language models (LLMs). These applications can answer questions about your specific corpus of knowledge, while leveraging all the nuance and sophistication of a traditional LLM.

This tutorial will take you through the ins and outs of creating a Q&A chatbot using RAG. The application will:

  1. Retrieve data from a MongoDB Atlas database.
  2. Embed and store documents as vector embeddings.
  3. Use LangChain4j to query the database and augment LLM prompts with the retrieved data.
  4. Enable secure, scalable, and efficient AI-powered applications.

If you want to see the completed application, it is available in the GitHub repository.

Read More

Migrating From PostgreSQL to MongoDB in a .NET EF Core Application

For many reasons—including scalability, flexibility, and modernization—more and more development teams are looking to migrate away from PostgreSQL to MongoDB. In the past, these teams might have been hesitant if they used Entity Framework Core (EF Core) as their object relational mapper (ORM).

With EF Core being one of the most popular ORMs for .NET development, we received a lot of requests from the community for a provider, and so did Microsoft! So it made sense for MongoDB to develop a provider for EF Core. This went generally available (GA) in May 2024 and has been greatly received by the community.

Plus, developers can now use MongoDB’s Relational Migrator, a free tool that uses smart algorithms and GenAI to streamline migrating from legacy relational databases to MongoDB, accelerating application modernization initiatives. So now is a great time to take a look at how you too can reap the benefits of all this by migrating your .NET application that uses PostgreSQL with EF Core, to use the MongoDB EF Core Provider.

In this tutorial, we will start off with a simple application that uses PostgreSQL as the database under the hood, and update it to still take advantage of EF Core but use MongoDB instead. So let’s get started!

Read More

Data Modeling for Java Developers: Structuring With PostgreSQL and MongoDB

Application and system designs have always been considered the most essential step in application development. All the later steps and technologies to be used depend on how the system has been designed. If you are a Java developer, choosing the right approach can mean distinguishing between a rigid, complex schema and a nimble, scalable solution. If you are a Java developer who works with PostgreSQL or other relational databases, you understand the pain of representing the many-to-many relationships between the tables.

This tutorial will ease your pain with these or other relationships defined in databases by making use of a document database, MongoDB.

In this article, we’ll understand both approaches, contrasting PostgreSQL’s relational rigour with MongoDB’s document-oriented simplicity. You’ll learn how to weigh trade-offs like ACID compliance versus scalability and discover why MongoDB’s design might save you time.

Read More

Build a Basic CRUD Application With Flask-PyMongo

In this tutorial, we will dive head first into utilizing MongoDB’s Flask-PyMongo library! We will build a basic CRUD (create, read, update, delete) Flask-PyMongo application and learn about how intuitive this library is for building fully functional Flask applications.

Read More