当前位置:网站首页>Dameng database backup and restore
Dameng database backup and restore
2022-06-26 04:29:00 【good writings make people copy them】
There are two types of backup : Physical and logical backup .
The physical backup : What is backed up is the data page that has been used effectively , Operating system physical files for the database ( Such as data files 、 Control files and log files, etc ).
Logical backup : The main backup objects are database objects ( surface 、 View 、 Index, etc. ), Logical backup can be used for data migration , Historical data archiving .
1.1 Physical backup restore
Physical backup is also divided into offline backup ( Cold standby ) And online backup ( Hot standby ) Two backup methods .
Cold standby (DmAPService It's open , The database is closed )
Hot standby (DmAPService It's open , The database is open , The database should be opened for archiving )
1. Cold standby
There are two ways of cold standby :console Tools 、dmrman Tools
(1)console Tool backup
**1. determine DmAPService Open or not
[[email protected] bin]$ ./DmAPService status
DmAPService (pid 22440) is running.**2. Close the database
[[email protected] bin]$ ./DmServiceDMSERVER stop
Stopping DmServiceDMSERVER: [ OK ]**3. Create a backup folder
[[email protected] dm8]$ mkdir -p backup
[[email protected] dm8]$ ls
backuo data include license_zh.txt tool
backup desktop jar log uninstall
bin doc jdk samples uninstall.sh
bin2 drivers license_en.txt script web**4. Backup started
[[email protected] tool]$ ./console
(Console:78964): GLib-GObject-WARNING **: 04:21:04.900: invalid (NULL) pointer instance
(Console:78964): GLib-GObject-CRITICAL **: 04:21:04.900: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(Console:78964): Gtk-CRITICAL **: 04:21:04.900: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gtk-WARNING **: 04:21:04.909: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
(Console:78964): Gtk-WARNING **: 04:21:04.909: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_display_get_pointer: assertion 'GDK_IS_DISPLAY (display)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_monitor_at_point: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gtk-WARNING **: 04:21:04.909: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_n_monitors: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gtk-WARNING **: 04:21:04.909: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_monitor_geometry: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_colormap_get_visual: assertion 'GDK_IS_COLORMAP (colormap)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
(Console:78964): Gdk-CRITICAL **: 04:21:04.909: IA__gdk_window_new: assertion 'GDK_IS_WINDOW (parent)' failed
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f237dcb32c7, pid=78964, tid=139790923097856
#
# JRE version: OpenJDK Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
# Java VM: OpenJDK 64-Bit Server VM (25.20-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libgdk-x11-2.0.so.0+0x7b2c7] gdk_window_enable_synchronized_configure+0x7
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /dm8/tool/hs_err_pid78964.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./console: That's ok 17: 78964 Has given up ( spit out the pips )"$JAVA_HOME/bin/java" -XX:+PerfDisableSharedMem -DDM_HOME="$DM_HOME" -Djava.library.path="$DM_HOME/bin" -Ddameng.log.file="$TOOL_HOME/log4j.xml" -DeclipseHome="$TOOL_HOME" -Dosgi.nl="$INSTALL_LANGUAGE" -Ddameng.dts.explorer.root="$TOOL_HOME/workspace/local/dts" -Ddameng.isql.explorer.root="$TOOL_HOME/workspace/local/isql" -Duse_bak2=true -Dapp.name=console -jar "$TOOL_HOME/plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar" -os linux -ws gtk -arch x86_64 -showsplash "$TOOL_HOME/console.bmp" -data "$TOOL_HOME/workspace/console" -product com.dameng.console.product -name Console
Once this problem is found , It is also the reason why the graphical interface cannot be opened , First, solve the problem of opening the graphical interface
[[email protected] ~]$ echo $DISPLAY
localhost:11.0
[[email protected] ~]$ export DISPLAY=localhost:11.0
[[email protected] ~]$ xhost +
access control disabled, clients can connect from any hostgood , Continue the backup :


Click ok , Backup success .
The difference between a full backup and an incremental backup :
Full backup : A full backup is a backup that contains all the data in a specified database or table space
Incremental backup : Incremental backup refers to a backup or the last incremental backup , Each backup in the future only needs files that have been added or modified compared with the previous backup
(2)dmrman Tool backup
[[email protected] tool]$ cd /dm8/bin
[[email protected] bin]$ ./dmrman
RMAN> backup database '/dm8/data/DAMENG/dm.ini' backupset '/dm8/backup';2. Hot standby
There are two ways of hot standby :manager Tools 、disql Tools
(1)manager
**1. determine DmAPService Open or not
[[email protected] bin]$ ./DmAPService status
DmAPService (pid 22440) is running.**2. Determine whether the database is open
[[email protected] bin]$ ./DmServiceDMSERVER start
DmServiceDMSERVER (pid 7878) is running.**3. Determine whether to open the archive
[[email protected] bin]$ ./disql
disql V8
user name :sysdba
password :
The server [LOCALHOST:5236]: In the normal open state
Login usage time : 3.916(ms)
SQL> select name,arch_mode from v$database;
Line number NAME ARCH_MODE
---------- ------ ---------
1 DAMENG N
Elapsed time : 1.735( millisecond ). Executive number :1700.Use manager Tool open archive
[[email protected] bin]$ mkdir -p /dm8/arch
[[email protected] bin]$ cd ../tool
[[email protected] tool]$ ./manager




**4. Backup started


3. Restore
First check the validity of the backup set
MAN> check backupset '/dm8/backup'
check backupset '/dm8/backup'
check backupset successfully.
time used: 13.518(ms)**1. Close database instance
[[email protected] tool]$ cd ../bin
[[email protected] bin]$ ./DmServiceDMSERVER stop
Stopping DmServiceDMSERVER: [ OK ]**2. Through the tool (console) Or order (dmrman) To restore ( Let's say console To restore )

Restore : Is to copy the database at a certain point in time ( Backup ) Copy to the corresponding directory
recovery : After the database restore , Apply some or all of the archived logs

**3. Use archived logs for recovery

**4. to update DB_Magic( Once updated DB_Magic, Backup is useless )

1.1 Logical backup recovery
Damon database logical backup tool can perform database level backup on local or remote databases 、 Logical backup at mode level and table level . The backup content is very flexible , You can choose whether to back up the index 、 Data rows and permissions , Whether to ignore various constraints ( Foreign key constraints 、 Non empty constraint 、 Unique constraints, etc ).
- Library level
- User level
- Mode level
- Table level
Here is an example of the library level :
1. Backup



2. recovery

边栏推荐
- How does virtual box virtual machine software accelerate the network speed in the virtual system?
- MySQL's built-in performance testing tool, mysqlslap, performs stress testing
- Principle and implementation of syn cookie
- 企业的产品服务怎么进行口碑营销?口碑营销可以找人代做吗?
- CDN with OSS acceleration
- TP5 distinct method paging problem
- Sixtool- source code of multi-functional and all in one generation hanging assistant
- A brain map to summarize the needs analysis (a supplement to the actual situation at work)
- Database design (3): database maintenance and optimization
- Realize video call and interactive live broadcast in the applet
猜你喜欢
![[geek challenge 2019] rce me](/img/92/978c54fb42391198300c76ae92893d.jpg)
[geek challenge 2019] rce me

35 year old programmer fired Luna millions of assets and returned to zero in three days. Netizen: it's the same as gambling

Install SVN in Pagoda and build SVN version Library

Redis cache data consistency solution analysis

How to carry out word-of-mouth marketing for enterprises' products and services? Can word of mouth marketing be done on behalf of others?

Mutex of thread synchronization (mutex)
![Simple personal summary of tp6 multi application deployment -- Part I [original]](/img/7b/65fab1973423081483dacc9bed9594.jpg)
Simple personal summary of tp6 multi application deployment -- Part I [original]

使用Jsoup提取接口中的图片

Sixtool- source code of multi-functional and all in one generation hanging assistant

Knowledge of SQL - database design, backup and restore
随机推荐
Clickhouse stand alone installation
Thymeleaf data echo, single selection backfill, drop-down backfill, time frame backfill
SQL related knowledge - constraints
Understand CGI and fastcgi
Sorting out the examination sites of the 13th Blue Bridge Cup single chip microcomputer objective questions
Ueeditor automatically appends P tags to rich text.br tags always wrap.br tag solutions
TP5 distinct method paging problem
Minecraft 1.16.5 biochemical 8 module 1.9 version 1.18 version synchronization
Fastadmin always prompts sqlstate[23000]: integrity constraint violation: 1052 column 'ID' in order clause is am
pip 批量完全卸载包
Clean up photo SCR virus / iframekill injection removal /iframekill removal photo scr
Thinkphp6 parsing QR code
SixTool-多功能多合一代挂助手源码
PHP design function getmaxstr to find the longest symmetric string in a string - [original]
Database design (I)
2021/11/6-burpsuit packet capturing and web page source code modification
Your requirements could not be resolved
[Qunhui] no port access (reverse proxy + intranet penetration)
[Nuggets' operation routine disclosure] the routine of being truly Nuggets
Knowledge of functions