使用nuoadmin逐步使用加速澳门比分网址

{问题}

如何使用nuoadmin运行Hotcopy?

{问题}

{回答}

/ opt / nuodb / bin / nuocmd显示域名

server version: 4.0.4-2-019a14f800, server license: Enterprise
server time: 2020-02-25T18:10:24.896, client token: 9654abc912062297aed49d071df99939e7af2e17
Servers:
[nuoadmin-0] localhost:48005 [last_ack = 9.55] [member = ADDED] [raft_state = ACTIVE] (LEADER, Leader=nuoadmin-0, log=0/26/26) Connected *
Databases:
test_nuodb [state = RUNNING]
[SM] 60df1252a474/localhost:48006 [start_id = 0] [server_id = nuoadmin-0] [pid = 361] [node_id = 1] [last_ack = 8.73] MONITORED:RUNNING
[TE] 60df1252a474/localhost:48007 [start_id = 1] [server_id = nuoadmin-0] [pid = 367] [node_id = 2] [last_ack = 4.67] MONITORED:RUNNIN

Nuoadmin HotCopy使用:

usage: nuocmd hotcopy database [-h] --db-name DB_NAME --type
{full,incremental,journal} [--shared]
[--default-backup-dir DEFAULT_BACKUP_DIR]
[--backup-dirs [BACKUP_DIRS [BACKUP_DIRS ...]]]
[--timeout TIMEOUT]

optional arguments:
-h, --help show this help message and exit
--db-name DB_NAME the name of the database to hot-copy
--type {full,incremental,journal}
the type of hot-copy to perform
--shared whether the backup location specified by --default-backup-dir is on
shared storage
--default-backup-dir DEFAULT_BACKUP_DIR
backup location to use for any archive that does not have a backup
location associated with it by --backup-dirs
--backup-dirs [BACKUP_DIRS [BACKUP_DIRS ...]]
map of archive ID to backup location to use for that archive
--timeout TIMEOUT if specified, the time to wait in seconds for the hot-copy to
complete; if not specified, the request is issued asynchronously

  

完整的hotcopy命令

完整的HotoPopy澳门比分网址文件将在“完整热屏”命令中指定的默认澳门比分网址目录下生成:

full hotcopy命令:

/opt/nuodb/bin/nuocmd hotcopy database --db-name <DB-NAME> --default-backup-dir <PATH-TO-BACKUP-DESTINATION> --type full
example:
/opt/nuodb/bin/nuocmd hotcopy database --db-name test_nuodb --default-backup-dir /tmp/backup/02-25-2020 --type full
HotCopyResponse(coordinator_start_id=0, id=ddeebf92-838f-4de6-b48e-c9630bcca7f8)
The full hotcopy backup files will be generates under the default backup dir specified in the full hotcopy command

检查完全HotCopy命令生成的文件:

# ls -l /tmp/backup/02-25-2020
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 18:27 full
-rw-rw-r-- 1 nuodb nuodb 425 Feb 25 18:27 state.xml
drwxrwxr-x 2 nuodb nuodb 6 Feb 25 18:27 tmp

 

增量HotCopy命令

请注意,增量澳门比分网址在Backup-Dir路径中首先需要完整澳门比分网址,否则您将收到错误消息:

'Hotcopy数据库'失败:在执行热拷贝时失败:发送引擎请求时出错:无法创建增量元素。澳门比分网址集中不存在完整的Hotcopy

/opt/nuodb/bin/nuocmd hotcopy database --db-name <DB-NAME> --default-backup-dir <PATH-TO-BACKUP-DESTINATION> --type incremental
example:
/opt/nuodb/bin/nuocmd hotcopy database --db-name test_nuodb --default-backup-dir /tmp/backup/02-25-2020 --type incremental
HotCopyResponse(coordinator_start_id=0, id=186a6017-2d93-48fb-bf3f-aaa3e1711212)
An incremental subdirectory will be created in the same level of the full backup subdirectory, in this example 1.inc

将在增量热循环命令中指定的默认澳门比分网址副规则下生成增量热电复印件

# ls -l /tmp/backup/02-25-2020
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 19:15 1.inc
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 18:27 full
-rw-rw-r-- 1 nuodb nuodb 425 Feb 25 18:27 state.xml
drwxrwxr-x 2 nuodb nuodb 6 Feb 25 19:15 tmp

下一个增量热剖能将生成2. inc子目录等。

 

期刊HotCopy.

要使用Journal Hotcopy与SM,请使用选项开始该SM --Journal-Hot-Copy Enable,如果不是,请在拍摄期刊HotCopy时收到以下错误消息

我停止了我正在使用的sm,我开始添加journal-hot-copy enable选项:

SM应通过启用期刊热副本重新启动SM:

/opt/nuodb/bin/nuocmd start process --db-name <DB-NAME> --server-id <Server-ID> --engine-type SM --archive-id <Archive-Id> --options  initialize false journal-hot-copy enable
example:
/opt/nuodb/bin/nuocmd start process --db-name test_nuodb --server-id nuoadmin-0 --engine-type SM --archive-id 0 --options  initialize false journal-hot-copy enable

 期刊HotCopy命令

/opt/nuodb/bin/nuocmd hotcopy database --db-name <DB-NAME> --default-backup-dir <PATH-TO-BACKUP-DESTINATION> --type journal
example:
/opt/nuodb/bin/nuocmd hotcopy database --db-name test_nuodb --default-backup-dir /tmp/backup/02-25-2020 --type journal
HotCopyResponse(coordinator_start_id=2, id=8614bb7b-9761-45fd-9556-37791e6f4702)

期刊HotCopy澳门比分网址文件将在“HotCopy”命令中指定的默认澳门比分网址指数下生成

# ls -l /tmp/backup/02-25-2020/
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 19:15 1.inc
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 20:05 1.jnl
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 19:23 2.inc
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 20:11 2.jnl
drwxrwxr-x 4 nuodb nuodb 31 Feb 25 18:27 full
-rw-rw-r-- 1 nuodb nuodb 425 Feb 25 18:27 state.xml
drwxrwxr-x 2 nuodb nuodb 6 Feb 25 20:11 tmp
 
如果您有任何疑问,请点击 这里 

{回答}

Have more questions? 提交申请

注释