EDB data synchronization and backup

Source: Internet
Author: User

1.1 EDB data Synchronization 1.1.1 Overview

?? When you encounter a requirement to synchronize the structure or data of two databases, you can synchronize with Navicat Premium (collectively referred to as NAVICAT) to migrate the object structure or data by synchronizing the database (non-heterogeneous database). Note that the heterogeneous database is not synchronized, the database migration does not have this qualification, such as 1, Figure 2, and the synchronization function is to change the target database according to the content of the source database, the source database does not change, before the database synchronization operation ("comparison") to do the analysis, Determine which content to synchronize.



Figure 1



Figure 2

1.1.2 Start Structure synchronization

Open Navicat to add the source and target database connections that need to be synchronized, as shown in 3.



Figure 3
Click Tools-Fabric synchronization in the toolbar and add the source, target database connection information, and in the Run options, select Run-after comparison, as shown in 4.



Figure 4
Click on "Alignment" to begin the sync analysis, as shown in 5.1 when the comparison is complete. Select the structure that needs to be synchronized, as shown in 5.2, if you only synchronize "Ldps_main" and "Joker_test" two objects, first click "Ldps_main" in the source object, the corresponding SQL in "Query modification" will be blue, the box before the corresponding SQL is selected, Then click "Joker_test" in the source object, in the "Query modification" in the corresponding SQL before the box is selected, and finally click "Run Query."



Figure 5.1



Figure 5.2
In the query modification statement, right-click "Check All", then click "Run Query", and then start the next comparison analysis, as shown in 6, found that there is a table to synchronize, continue to right-click "Check All", and then click "Run Query", and then run a new comparison, as shown in 7, It can be concluded that the structure synchronization has been completed, that is, the structure of the target database is completely consistent with the structure in the source database. Alternatively, you can cut to the Infolog to view the synchronization log information, as shown in 8.



Figure 6



Figure 7



Figure 8
Using Postgres Enterprise Manager to open the source, the target database to verify the synchronization results, as shown in 9, you can know that the structure of synchronization success.



Figure 9

1.1.3 Start Data synchronization

Use data synchronization to synchronize data from 2 tables in the source database to the target database. The data in Ri_gds and RI_PCC before synchronization (source database) is shown in Figure 11, 10.



Figure 10



Figure 11
The data in Ri_gds and RI_PCC before synchronization (the target database) is shown in Figure 13, 12.



Figure 12



Figure 13
Start data synchronization, click Tools in the Toolbar-"Data Synchronization", and add source, target database connection information, the source database, the table in the target database is automatically loaded below, in the source table list to locate the table that needs to be synchronized, and then select the table in the target table to synchronize data, as shown in 14. Note: The structure of the two tables you synchronize must be the same, or you will get an error.


Figure 14
Click "Start" at the bottom of the page to start data synchronization, and the data synchronization log information, as shown in 15.



Figure 15
Check to the target database to see if the data has been synchronized from the source database. Query the data in Ri_gds, RI_PCC from the target database, as shown in Figure 17.16.



Figure 16



Figure 17
Concludes that this data migration is successful.

1.2 Database backup and recovery 1.2.1 SQL EXPORT

Sometimes we need the structure of some or a Table object to define SQL (data into SQL), right-click the dump SQL file on the target table object, and then select the export structure (structure and data), as shown in Figure 1 and 2.



Figure 1



Figure 2

1.2.2 Backup and Recovery

Sometimes we need to back up a database, right-click the dump SQL file on the target database object, and then select the export structure (structure and data) based on the backup requirements, as shown in 3; Right-click on the target database object to run the SQL file on the database objects when you restore it.



Figure 3

EDB data synchronization and backup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.