The use of sys_dump, the backup application of the National People's Congress Jincang database

The Renda Jincang database software provides database administrators with multiple client applications for managing and maintaining databases. For more information: "KingbaseES Client Application Reference Manual". 

 We can see that there are two backup applications:

1. sys_dump: back up the KingbaseES database as a script file or other archive file

2. sys_dumpall: back up a KingbaseES database instance into a script file

You can see the difference between the two, sys_dump backs up individual databases to script files or other types of archive files; only dumps one database at a time, and does not dump roles or tablespaces (because they are cluster-wide of) information .

And sys_dumpall backs up all databases in a database instance to a script file. To back up a cluster or global objects common to all databases in a cluster (such as roles and tablespaces), use sys_dumpall .

For the backup work of a database of KingbaseES, we can use the graphical interface tool: database object management tool:

 The application is located in the ManagerTools directory under the installation directory, such as KingBaseEs V8 on Windows: "D:\Program Files\Kingbase\ES\V8\ManagerTools\manager.exe".

In the database object management tool, select the menu when right-clicking the database to be backed up:

It can be seen that the logical backup function is provided. In the backup interface, you can see that the backup is a binary file, the backup is an SQL file, only the data is backed up, only the definition is backed up, the data is backed up as an INSERT statement, and the backup is a column name. Insert statement, do not back up table space definition, do not back up UNLOG table data and other functions:

Let’s not talk about other things for the time being. This time, let’s talk about the case where the backup is an SQL file. You can directly click the [Backup] button to operate the graphical interface.

We click [Command] to switch to the command used this time:

"D:\Program Files\Kingbase\ES\V8\ManagerTools\bin\sys_dump" -h 127.0.0.1 -p 54321 -U system -v -f "D:\Program Files\Kingbase\ES\V8\ManagerTools\DB_2022-12-27_09_50_22.sql" -F p  signserver_sm

 You can see that the command format is roughly: ./sys_dump -h hostIp -p password -U username -v -f filedestination -F p databasename

-h specifies the ip of the database server

-p specifies the password of the logged-in user

-U specifies the login username

-v specifies verbose mode, which will cause sys_dump to output verbose object comments to standard error along with start/stop times of the dump file, and progress messages

-f specifies the file address of the backup

-F specifies the output mode

p Here p is the parameter of -F, and p outputs a SQL script file in plain text

 For more parameter meanings, please refer to: Jincang Database KingbaseES Client Application Reference Manual--11.

 

Supongo que te gusta

Origin blog.csdn.net/yeyuningzi/article/details/128452392
Recomendado
Clasificación