查看备份信息

备份信息查看可以通过客户端和手工查看。

查看备份信息参数说明

参数说明
Name备份名称,缺省则查看目录下所有备份信息。
Path查看备份的指定路径,缺省为配置参数“bkuppath”中指定的路径。
GroupName查看指定组的备份信息,缺省为查看全系统备份信息,当需要查看多个组的备份信息可以指定为数组类型,如:[“datagroup1”, “datagroup2”]
Detail是否显示备份的详细信息,缺省为 false

查看全系统备份信息

  1. 连接到协调节点

    1. $ /opt/sequoiadb/bin/sdb
    2. > var db = new Sdb( "localhost", 11810 )
  2. 执行查看备份信息命令

    1. > db.listBackup()
    2. {
    3. "Version": 2
    4. "Name": "test_bk",
    5. "ID": 0,
    6. "NodeName": "hostname1:11800",
    7. "GroupName": "SYSCatalogGroup",
    8. "EnsureInc": false,
    9. "BeginLSNOffset": 0,
    10. "EndLSNOffset": 18744,
    11. "StartTime": "2013-11-13-16:06:31",
    12. "LastLSN": 18740,
    13. "LastLSNCode": 1845751176,
    14. "HasError": false
    15. }
    16. {
    17. "Version": 2
    18. "Name": "test_bk",
    19. "ID": 0,
    20. "NodeName": "hostname1:11820",
    21. "GroupName": "group1",
    22. "EnsureInc": false,
    23. "BeginLSNOffset": 0,
    24. "EndLSNOffset": 920424,
    25. "StartTime": "2013-11-13-16:06:31",
    26. "LastLSN": 920368,
    27. "LastLSNCode": 584896125,
    28. "HasError": false
    29. }

查看指定名称的备份信息

  1. 连接到协调节点

    1. $ /opt/sequoiadb/bin/sdb
    2. > var db = new Sdb( "localhost", 11810 )
  2. 执行查看备份信息命令

    1. > db.listBackup({Name:"backup1"})
    2. {
    3. "Version": 2
    4. "Name": "backup1",
    5. "ID": 0,
    6. "NodeName": "hostname1:11820",
    7. "GroupName": "group1",
    8. "EnsureInc": false,
    9. "BeginLSNOffset": 0,
    10. "EndLSNOffset": 108744,
    11. "StartTime": "2013-11-13-16:06:31",
    12. "LastLSN": 108700,
    13. "LastLSNCode": 89578458,
    14. "HasError": false
    15. }

查看指定路径下的备份信息

  1. 备份到指定的路径

    1. $ /opt/sequoiadb/bin/sdb
    2. > var datadb = new Sdb( "localhost", 20000 )
    3. > datadb.backup( { Path: "/tmp/sequoiadb_backup/20000" } )
  2. 连接 coord 查看备份信息,需要指定 Path 参数

    1. > var db = new Sdb( "localhost", 11810 )
    2. > db.listBackup( { Path: "/tmp/sequoiadb_backup/20000" } )
    3. {
    4. "Version": 2,
    5. "Name": "2017-10-26-10:14:11",
    6. "ID": 0,
    7. "NodeName": "ubuntu-test-03:20000",
    8. "GroupName": "db1",
    9. "EnsureInc": false,
    10. "BeginLSNOffset": -1,
    11. "EndLSNOffset": 375546828,
    12. "TransLSNOffset": -1,
    13. "StartTime": "2017-10-26-10:14:11",
    14. "LastLSN": -1,
    15. "LastLSNCode": 0,
    16. "HasError": false
    17. }

手工查看备份信息

手工查看备份信息直接通过终端登入指定机器,并进入到相应的备份目录中,执行 ls -l

  1. sdbadmin@hostname1:/opt/sequoiadb/database/11820/bakfile> ls -l
  2. total 37328
  3. -rw-r----- 1 sdbadmin sdbadmin 38157784 Nov 13 16:06 test_bk.1
  4. -rw-r----- 1 sdbadmin sdbadmin 65536 Nov 13 16:06 test_bk.bak