Databases 5 min read

Master Database Backup & Structure Sync with Navicat: Step‑by‑Step Guide

This tutorial explains how to use Navicat to back up a test database, delete and restore product data, and synchronize schema changes between test and production databases, providing detailed step‑by‑step instructions with screenshots.

macrozheng
macrozheng
macrozheng
Master Database Backup & Structure Sync with Navicat: Step‑by‑Step Guide

Navicat

Navicat is a fast, reliable database management tool designed to simplify database administration and reduce system management costs. It serves database administrators, developers, and small‑to‑medium enterprises with an intuitive graphical interface for secure and simple creation, organization, access, and sharing of information.

Note: This tutorial uses Navicat 12; download link: https://www.navicat.com.cn/download/navicat-premium

Database Overview

There are two databases: mall-test (test environment) and mall-prod (production environment).

Data Backup

First back up the mall-test database, then delete data from the product table and restore it from the backup.

Data Overview in mall-test

The database currently contains only the product module tables, with data in the

pms_product

table.

Perform Data Backup

Click the backup icon on the top toolbar, then click the "New Backup" button.

Click the "Start" button to begin the backup.

After completion, a backup file is generated.

Clear pms_product Table Data

Restore Data from Backup

Structure Synchronization

Background

The original mall-test module only had product tables. After development, an order module was added and some product tables were deleted or modified, while mall-prod still contains the original product tables. The goal is to synchronize the test database schema to production.

Perform Structure Synchronization

Select the Structure Sync feature.

Choose source and target databases, then click the Compare button.

Review added, modified, and deleted tables; preview the generated SQL script.

After confirming the deployment script, click Run to synchronize the schema.

Subsequent synchronizations show that the two databases are now identical.

data migrationSQLdatabase backupNavicatStructure Sync
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.