1.   Bconsole操作

启动控制台

cd /usr/local/bacula/bin

./bconsole

*help

Command       Description

=======       ===========

add           Add media to a pool

autodisplay   Autodisplay console messages

automount     Automount after label

cancel        Cancel a job

create        Create DB Pool from resource

delete        Delete volume, pool or job

disable       Disable a job, attributes batch process

enable        Enable a job, attributes batch process

estimate      Performs FileSet estimate, listing gives full listing #预算某个备份或恢复job

exit          Terminate Bconsole session

gui           Non-interactive gui mode

help          Print help on specific command

label         Label a tape

list          List objects from catalog

llist         Full or long list like list command

messages      Display pending messages

memory        Print current memory usage

mount         Mount storage

prune         Prune expired records from catalog  #从目录中删除过期记录(清除6个月(默认)以上的备份)

purge         Purge records from catalog         #清除目录中的记录 (危险操作)

quit          Terminate Bconsole session

query         Query catalog

restore       Restore files

relabel       Relabel a tape

release       Release storage

reload        Reload conf file               #当配置文件修改之后,重新加载配置文件

run           Run a job

restart       Restart a job

resume        Resume a job

status        Report status

stop          Stop a job

setdebug      Sets debug level

setbandwidth  Sets bandwidth

snapshot      Handle snapshots

setip         Sets new client address -- if authorized

show          Show resource records

sqlquery      Use SQL to query catalog

time          Print current time

trace         Turn on/off trace to file

truncate      Truncate one or more Volumes

unmount       Unmount storage

umount        Umount - for old-time Unix guys, see unmount

update        Update volume, pool or stats

use           Use catalog xxx

var           Does variable expansion

version       Print Director version

wait          Wait until no jobs are running

When at a prompt, entering a period cancels the command.

1.1.   查看bacula版本

*version

server-dir Version: 7.4.7 (16 March 2017) x86_64-unknown-linux-gnu redhat

1.2.   estimate

*estimate

The defined Job resources are:

1: client1-backup

2: client1-restores

Select Job resource (1-2):

Using Catalog "MyCatalog"

Connecting to Client client1-fd at 192.168.119.130:9102

2000 OK estimate files=29 bytes=2,569,048

1.3.   label 初始化存储

(备份数据全部存储至新label中,已备份的任务建议不要操作)

*label

Automatically selected Catalog: MyCatalog

Using Catalog "MyCatalog"

The defined Storage resources are:

1: File1

2: File2

Select Storage resource (1-2):   # 选择存储资源

Enter new Volume name: bk   # 输入新的存储名

Defined Pools:

1: Default

2: File

3: Scratch

4: File-1

5: Pool1

6: pool1

Select the Pool (1-6): 6     # 选择Pool,根据实际情况填写

Connecting to Storage daemon File1 at 192.168.119.129:9103 ...

Sending label command for Volume "bk" Slot 0 ...

3000 OK label. VolBytes=187 VolABytes=0 VolType=1 Volume="bk" Device="FileChgr1-Dev1" (/data)

Catalog record for Volume "bk", Slot 0  successfully created.

Requesting to mount FileChgr1 ...

3906 File device ""FileChgr1-Dev1" (/data)" is always mounted.

1.4.   run备份测试(一次全备)

*run

A job name must be specified.

The defined Job resources are:

1: client1-backup

2: client1-restores

Select Job resource (1-2):   #选择客户端

Run Backup job

JobName:  client1-backup

Level:    Incremental

Client:   client1-fd

FileSet:  FileSet1

Pool:     pool1 (From Job resource)

Storage:  File1 (From Job resource)

When:     2017-07-16 10:36:22

Priority: 10

OK to run? (yes/mod/no): mod  #选择备份模式

Parameters to modify:

1: Level

2: Storage

3: Job

4: FileSet

5: Client

6: When

7: Priority

8: Pool

9: Plugin Options

Select parameter to modify (1-9):  #修改备份模式

Levels:

1: Full

2: Incremental

3: Differential

4: Since

5: VirtualFull

Select level (1-5): 1 #选择全备

Run Backup job

JobName:  client1-backup

Level:    Full

Client:   client1-fd

FileSet:  FileSet1

Pool:     pool1 (From Job resource)

Storage:  File1 (From Job resource)

When:     2017-07-16 10:36:22

Priority: 10

OK to run? (yes/mod/no): yes

Job queued. JobId=106

You have messages.

1.5.   status查看状态

*status

Status available for:

1: Director

2: Storage

3: Client

4: Scheduled

5: All

Select daemon type for status (1-5):

The defined Client resources are:

1: server-fd

2: client1-fd

Select Client (File daemon) resource (1-2):

Connecting to Client client1-fd at 192.168.119.130:9102

client-fd Version: 7.4.7 (16 March 2017)  x86_64-unknown-linux-gnu redhat

Daemon started 16-Jul-17 09:05. Jobs: run=12 running=0.

Heap: heap=135,168 smbytes=298,089 max_bytes=898,791 bufs=86 max_bufs=149

Sizes: boffset_t=8 size_t=8 debug=0 trace=0 mode=0 bwlimit=0kB/s

Plugin: bpipe-fd.so

Running Jobs:

Director connected at: 16-Jul-17 10:39

No Jobs running.

====

Terminated Jobs:

JobId  Level      Files    Bytes   Status   Finished        Name

===================================================================

97  Full          29    231.1 K  OK       16-Jul-17 09:30 client1-backup

98  Incr           2    80.74 K  OK       16-Jul-17 09:35 client1-backup

99  Incr           3    81.83 K  OK       16-Jul-17 09:45 client1-backup

100  Incr           3    82.64 K  OK       16-Jul-17 09:55 client1-backup

101  Diff           3    82.99 K  OK       16-Jul-17 10:00 client1-backup

102  Incr           2    83.30 K  OK       16-Jul-17 10:05 client1-backup

103  Incr           3    84.23 K  OK       16-Jul-17 10:15 client1-backup

104  Incr           6    86.74 K  OK       16-Jul-17 10:25 client1-backup

105  Incr           2    85.98 K  OK       16-Jul-17 10:35 client1-backup

106  Full          29    237.1 K  OK       16-Jul-17 10:37 client1-backup

====

1.6.   restore恢复操作

*restore

Using Catalog "MyCatalog"

First you select one or more JobIds that contain files

to be restored. You will be presented several methods

of specifying the JobIds. Then you will be allowed to

select which files from those JobIds are to be restored.

To select the JobIds, you have the following choices:

1: List last 20 Jobs run #列出最近运行的20个Job

2: List Jobs where a given File is saved                    # 列出备份文件的路径

3: Enter list of comma separated JobIds to select          # 按照特定的Jobid还原

4: Enter SQL list command                               # 输入SQL语句

5: Select the most recent backup for a client              # 选择最近一次的备份

6: Select backup for a client before a specified time       # 选择指定的备份时间点来恢复(时间点之前)

7: Enter a list of files to restore

8: Enter a list of files to restore before a specified time

9: Find the JobIds of the most recent backup for a client  # 找到最近一次备份的Jobid

10: Find the JobIds for a backup for a client before a specified time

11: Enter a list of directories to restore for found JobIds

12: Select full restore to a specified Job date

13: Cancel

Select item:  (1-13): 9   #查看最近的一个备份点

Defined Clients:

1: client-fd

2: client1-fd

3: server-fd

4: sky-client-fd

Select the Client (1-4):

Automatically selected FileSet: FileSet1

+-------+-------+----------+----------+---------------------+--------------------------------+

| JobId | Level | JobFiles | JobBytes | StartTime           | VolumeName                     |

+-------+-------+----------+----------+---------------------+--------------------------------+

|   106 | F     |       29 |  237,101 | 2017-07-16 10:37:01 | client1-backup-2017-07-16-id95 |

+-------+-------+----------+----------+---------------------+--------------------------------+

To select the JobIds, you have the following choices:

1: List last 20 Jobs run

2: List Jobs where a given File is saved

3: Enter list of comma separated JobIds to select

4: Enter SQL list command

5: Select the most recent backup for a client

6: Select backup for a client before a specified time

7: Enter a list of files to restore

8: Enter a list of files to restore before a specified time

9: Find the JobIds of the most recent backup for a client

10: Find the JobIds for a backup for a client before a specified time

11: Enter a list of directories to restore for found JobIds

12: Select full restore to a specified Job date

13: Cancel

Select item:  (1-13): 5  #恢复测试,选择最近的一个备份点

Defined Clients:

1: client-fd

2: client1-fd

3: server-fd

4: sky-client-fd

Select the Client (1-4):

Automatically selected FileSet: FileSet1

+-------+-------+----------+----------+---------------------+--------------------------------+

| JobId | Level | JobFiles | JobBytes | StartTime           | VolumeName                     |

+-------+-------+----------+----------+---------------------+--------------------------------+

|   106 | F     |       29 |  237,101 | 2017-07-16 10:37:01 | client1-backup-2017-07-16-id95 |

|   107 | I     |        3 |   87,230 | 2017-07-16 10:45:13 | client1-backup-2017-07-16-id95 |

+-------+-------+----------+----------+---------------------+--------------------------------+

You have selected the following JobIds: 106,107  # 查找到最近的一次是1个全量(106)加1个增量(107)

Building directory tree for JobId(s) 106,107 ...

28 files inserted into the tree.

You are now entering file selection mode where you add (mark) and

remove (unmark) files to be restored. No files are initially added, unless

you used the "all" keyword on the command line.

Enter "done" to leave this mode.

# 查看备份的内容

cwd is: /

$ ls

var/

$ cd var/log/

cwd is: /var/log/

$ ls

anaconda.ifcfg.log

anaconda.log

anaconda.program.log

anaconda.storage.log

anaconda.syslog

anaconda.xlog

anaconda.yum.log

audit/

boot.log

btmp

cron

cron-20170716

dmesg

dmesg.old

dracut.log

lastlog

maillog

maillog-20170716

messages

messages-20170716

mysqld.log

secure

secure-20170716

spooler

spooler-20170716

tallylog

wtmp

$ mark messages

# 标记需要还原的文件

# mark * 标记全部

# unmark messages 不标记的内容,只能unmark已经标记的

1 file marked.

$ done  #确认还原

Bootstrap records written to /root/bacula/bin/working/server-dir.restore.1.bsr

Bootstrap records written to /root/bacula/bin/working/server-dir.restore.1.bsr

The Job will require the following (*=>InChanger):

Volume(s)                 Storage(s)                SD Device(s)

===========================================================================

client1-backup-2017-07-16-id95 File1                     FileChgr1

Volumes marked with "*" are in the Autochanger.

1 file selected to be restored.

客户端的/opt目录下查看恢复的内容

[root@client opt]# cd /opt/var/log/

[root@client log]# ls

Messages   # 文件已恢复

1.7.   delete删除备份记录

*delete

Automatically selected Catalog: MyCatalog

Using Catalog "MyCatalog"

In general it is not a good idea to delete either a

Pool or a Volume since they may contain data.

You have the following choices:

1: volume

2: pool

3: jobid

4: snapshot

Choose catalog item to delete (1-4):

Defined Pools:

1: Default

2: File

3: Scratch

4: Pool1

Select the Pool (1-4):

+---------+-------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+------------+

| MediaId | VolumeName  | VolStatus | Enabled | VolBytes       | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         | ExpiresIn  |

+---------+-------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+------------+

|      16 | Backup-0016 | Purged    |       1 | 21,474,832,957 |        4 |   31,536,000 |       1 |    0 |         0 | File1     | 2017-09-29 13:01:53 | 22,278,875 |

|      17 | Backup-0017 | Purged    |       1 | 21,474,818,922 |        4 |   31,536,000 |       1 |    0 |         0 | File1     | 2017-09-29 13:35:54 | 22,280,916 |

|      18 | Backup-0018 | Purged    |       1 | 21,474,818,951 |        4 |   31,536,000 |       1 |    0 |         0 | File1     | 2017-09-29 14:09:56 | 22,282,958 |

|      19 | Backup-0019 | Purged    |       1 | 21,474,818,846 |        4 |   31,536,000 |       1 |    0 |         0 | File1     | 2017-09-29 14:43:57 | 22,284,999 |

|      20 | Backup-0020 | Purged    |       1 | 21,474,809,417 |        4 |   31,536,000 |       1 |    0 |         0 | File1     | 2017-10-01 00:36:35 | 22,406,957 |

+---------+-------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+------------+

Enter a Volume name or *MediaId: *16

This command will delete volume Backup-0016

and all Jobs saved on that volume from the Catalog

Are you sure you want to delete Volume "Backup-0016"? (yes/no): yes

Delete 删除的是数据库里备份的记录,备份的真实文件不会删除

也可以指定指定删除的volumepooljobs,直接删除(批量删除)

# 批量删除volume

delete volume=Vol-0085 pool=Pool1 yes

delete volume=Vol-0086 pool=Pool1 yes

delete volume=Vol-0087 pool=Pool1 yes

This command will delete volume Backup-0017

and all Jobs saved on that volume from the Catalog

# 批量删除JOB

delete jobid=18 yes

delete jobid=19 yes

1.8.   update更新(修改备份状态信息)

*update volume

Using Catalog "MyCatalog"

Parameters to modify:

1: Volume Status

2: Volume Retention Period

3: Volume Use Duration

4: Maximum Volume Jobs

5: Maximum Volume Files

6: Maximum Volume Bytes

7: Recycle Flag

8: Slot

9: InChanger Flag

10: Volume Files

11: Pool

12: Volume from Pool

13: All Volumes from Pool

14: All Volumes from all Pools

15: Enabled

16: RecyclePool

17: Action On Purge

18: Done

Select parameter to modify (1-18): 2   # 修改volume Retention

Defined Pools:

1: Default

2: File

3: Scratch

4: Pool1

Select the Pool (1-4):

+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+-----------+

| MediaId | VolumeName | VolStatus | Enabled | VolBytes    | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         | ExpiresIn |

+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+-----------+

|       6 | sky-0006   | Full      |       1 |  10,434,870 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:10:01 |         0 |

|       8 | sky-0008   | Full      |       1 |   1,032,403 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:10:01 |         0 |

|       9 | sky-0009   | Full      |       1 |   1,032,403 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:15:02 |         0 |

|      11 | sky-0011   | Full      |       1 |   1,032,403 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:09:57 |         0 |

|      12 | sky-0012   | Full      |       1 | 104,815,926 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:10:00 |         0 |

|      13 | sky-0013   | Full      |       1 | 104,812,295 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-29 23:09:56 |         0 |

|      14 | sky-0014   | Full      |       1 | 104,845,581 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-30 22:50:24 |         0 |

|      15 | sky-0015   | Full      |       1 | 104,832,211 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-30 22:50:28 |         0 |

|      16 | sky-0016   | Full      |       1 | 104,849,950 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-30 22:50:32 |         0 |

|      17 | sky-0017   | Purged    |       1 | 104,801,017 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-12 05:52:54 |         0 |

|      18 | sky-0018   | Purged    |       1 | 104,801,017 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-12 05:52:51 |         0 |

|      19 | sky-0019   | Full      |       1 | 104,795,818 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2017-11-30 22:50:41 |         0 |

|      20 | sky-0020   | Full      |       1 | 104,795,411 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-14 05:54:40 |    53,691 |

|      21 | sky-0021   | Full      |       1 | 104,828,675 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-14 12:45:02 |    78,313 |

|      22 | sky-0022   | Full      |       1 | 104,797,721 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-14 07:25:02 |    59,113 |

|      23 | sky-0023   | Purged    |       1 | 104,801,017 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-12 05:52:46 |         0 |

|      24 | sky-0024   | Append    |       1 |  47,138,302 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-14 14:55:02 |    86,113 |

|      25 | sky-0025   | Purged    |       1 | 104,818,041 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-13 05:58:19 |         0 |

|      26 | sky-0026   | Purged    |       1 | 104,801,017 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-12 05:52:39 |         0 |

|      27 | sky-0027   | Full      |       1 | 104,815,926 |        0 |        3,600 |       1 |    0 |         0 | File1     | 2017-11-29 23:20:05 |         0 |

|      28 | aaa        | Purged    |       1 | 104,816,609 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-12 05:52:43 |         0 |

|      29 | aaa1       | Purged    |       1 | 104,836,570 |        0 |       86,400 |       1 |    0 |         0 | File1     | 2018-01-13 05:53:15 |         0 |

|      30 | sky        | Append    |       1 |         206 |        0 |       86,400 |       1 |    0 |         0 | File1     | NULL                | NULL      |

+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+-----------+

Enter a Volume name or *MediaId: *26  # 选择需要修改的volume

Updating Volume "sky-0026"

Current retention period is: 1 day

Enter Volume Retention period: 3600   # 输入需要修改的时间(单位:s)

New retention period is: 1 hour

Parameters to modify:

1: Volume Status

2: Volume Retention Period

3: Volume Use Duration

4: Maximum Volume Jobs

5: Maximum Volume Files

6: Maximum Volume Bytes

7: Recycle Flag

8: Slot

9: InChanger Flag

10: Volume Files

11: Pool

12: Volume from Pool

13: All Volumes from Pool

14: All Volumes from all Pools

15: Enabled

16: RecyclePool

17: Action On Purge

18: Done

Select parameter to modify (1-18):

Selection terminated.

1.9.   Purge备份记录

Purge Purge records from catalog

Purge file/job/volume会将记录清除,但对应的磁盘文件不会删除,系统会标记volume为purged,新的备份会自动写入到purged volume中。

无论purge file/job/volume,对应的file/job/volume将无法恢复,所有此操作非常危险,请谨慎使用。

*purge

This command can be DANGEROUS!!!

It purges (deletes) all Files from a Job,

JobId, Client or Volume; or it purges (deletes)

all Jobs from a Client or Volume without regard

to retention periods. Normally you should use the

PRUNE command, which respects retention periods.

You have the following choices:

1: files

2: jobs

3: volume

Choose item to purge (1-3): 2  #清除job记录

The defined Client resources are:

1: server-fd

2: client1-fd

Select Client (File daemon) resource (1-2): 1 # 选择client

Begin purging jobs from Client "server-fd"

6 Jobs for client server-fd purged from MyCatalog catalog.

# 批量pruge volume

purge volume=Vol-0104 pool=Pool1 yes

purge volume=Vol-0105 pool=Pool1 yes

purge volume=Vol-0106 pool=Pool1 yes

purge volume=Vol-0107 pool=Pool1 yes

1.10.   Prune备份记录

Prune是个比较安全的操作,当volume没有达到VolRetention时间即使prune操作了也不会有影响。

# 批量prune

prune volume=Vol-0001 pool=Pool1 yes

prune volume=Vol-0002 pool=Pool1 yes

prune volume=Vol-0003 pool=Pool1 yes

prune volume=Vol-0004 pool=Pool1 yes

7.Bconsole操作的更多相关文章

  1. bacula备份终端操作bconsole指令

    1.list命令列出各种备份状态信息   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 list Jobs     #列出所有备份记录状态 list jobid= ...

  2. 关于DOM的操作以及性能优化问题-重绘重排

     写在前面: 大家都知道DOM的操作很昂贵. 然后贵在什么地方呢? 一.访问DOM元素 二.修改DOM引起的重绘重排 一.访问DOM 像书上的比喻:把DOM和JavaScript(这里指ECMScri ...

  3. Sql Server系列:分区表操作

    1. 分区表简介 分区表在逻辑上是一个表,而物理上是多个表.从用户角度来看,分区表和普通表是一样的.使用分区表的主要目的是为改善大型表以及具有多个访问模式的表的可伸缩性和可管理性. 分区表是把数据按设 ...

  4. C# ini文件操作【源码下载】

    介绍C#如何对ini文件进行读写操作,C#可以通过调用[kernel32.dll]文件中的 WritePrivateProfileString()和GetPrivateProfileString()函 ...

  5. js学习笔记:操作iframe

    iframe可以说是比较老得话题了,而且网上也基本上在说少用iframe,其原因大致为:堵塞页面加载.安全问题.兼容性问题.搜索引擎抓取不到等等,不过相对于这些缺点,iframe的优点更牛,跨域请求. ...

  6. jquery和Js的区别和基础操作

    jqery的语法和js的语法一样,算是把js升级了一下,这两种语法可以一起使用,只不过是用jqery更加方便 一个页面想要使用jqery的话,先要引入一下jqery包,jqery包从网上下一个就可以, ...

  7. ASP.NET Aries 入门开发教程7:DataGrid的行操作(主键操作区)

    前言: 抓紧勤奋,再接再励,预计共10篇来结束这个系列. 上一篇介绍:ASP.NET Aries 入门开发教程6:列表数据表格的格式化处理及行内编辑 本篇介绍主键操作区相关内容. 1:什么时候有默认的 ...

  8. 如何在高并发环境下设计出无锁的数据库操作(Java版本)

    一个在线2k的游戏,每秒钟并发都吓死人.传统的hibernate直接插库基本上是不可行的.我就一步步推导出一个无锁的数据库操作. 1. 并发中如何无锁. 一个很简单的思路,把并发转化成为单线程.Jav ...

  9. 【翻译】MongoDB指南/CRUD操作(四)

    [原文地址]https://docs.mongodb.com/manual/ CRUD操作(四) 1 查询方案(Query Plans) MongoDB 查询优化程序处理查询并且针对给定可利用的索引选 ...

随机推荐

  1. Android 中View的工作原理

    Android中的View在Android的知识体系中扮演着重要的角色.简单来说,View就是Android在视觉的体现.我们所展现的页面就是Android提供的GUI库中控件的组合.但是当要求不能满 ...

  2. 【Matlab开发】函数bsxfun的使用

    [Matlab开发]函数bsxfun的使用 标签:[Matlab开发] 版权声明:本文为博主原创文章,转载请注明出处http://blog.csdn.net/lg1259156776/. 说明:当我们 ...

  3. SQL0668N Operation not allowed for reason code "3" on table "TEST". SQLSTATE=57016

    问题描述: 查询,操作表都报如下错误 SQL0668N  Operation not allowed for reason code "3" on table "TEST ...

  4. Python 解leetcode:3. Longest Substring Without Repeating Characters

    题目描述:求一个字符串的不含重复字符的最长连续子串的长度: 思路: 使用一个哈希表保存字符出现的位置: 使用left和right分别表示子串的最左和最右字符的下标: 遍历字符串,如果当前字符在哈希表中 ...

  5. ios 输入框失去焦点,位置回调方法

    微信网页开发,ios 在input,textarea 失去焦点后,页面无法回调. 以下方法可解决: $("input,textarea").on("blur", ...

  6. Go语言操作NoSql

    NSQ平台 NSQ是目前比较流行的一个分布式的消息队列,本文主要介绍了NSQ及Go语言如何操作NSQ. NSQ NSQ介绍 NSQ是Go语言编写的一个开源的实时分布式内存消息队列,其性能十分优异. N ...

  7. 第1章:Python语言与Linux系统管理

    1.Python语言为什么流行 1).简单易学 2).丰富强大的库 3).开发效率高 2.Python语言有什么缺点 1).Python的执行速度不够快 2).Python的GIL锁限制并发:GIL是 ...

  8. thymeleaf 模板使用 提取公共页面

    切记!!!thymeleaf模板的使用,姿势很重要!!!姿势不对,可能导致样式.js等的使用受到影响 前台开发中,由于页面目录结构不同,可能导致引入的公共页面中的的跳转路径在部分页面能用,部分页面不能 ...

  9. mysql索引实现原理

    什么是索引: 索引是一种高效获取数据的存储结构,例:hash. 二叉. 红黑. Mysql为什么不用上面三种数据结构而采用B+Tree: 若仅仅是  select * from table where ...

  10. 工作单元 — Unit Of Work

    在进行数据库添加.修改.删除时,为了保证事务的一致性,即操作要么全部成功,要么全部失败.例如银行A.B两个账户的转账业务.一方失败都会导致事务的不完整性,从而事务回滚.而工作单元模式可以跟踪事务,在操 ...