三、Nexus的存储:BlobStores的相关知识
1、BlobStore基础知识
登录Nexus 可以查看设置页⾯有Blob Stores的选项。
界⾯.png
点击后可以查看现有Blob Stores的信息(包括Type、Blob数⽬、现有⽂件夹的⼤⼩,可⽤空间的⼤⼩)、新建Blob Stores。
Image 3.png
1、Blob Stores属性
blob stores可以被⼀个或者多个仓库组使⽤。默认的Blob stores是基于⽂件系统的。可以简单的理解为⼀个⽂件夹。Blob Stores参数如下:Name:Blob Store的名称,唯⼀。
the name of the blob store as displayed in the repository administration
Type:类型,⼀般为File
the type of the blob store backend; currently only File is available representing a file system-based storage
Blob count:Blob数⽬repository文件夹可以删除吗
the number of blobs currently stored
Total size:现有⽂件夹的⼤⼩
the size of the blob store
Available space:可⽤空间
the overall space available for the blob store
2、新建Blob Store
Type默认File、Name唯⼀、Path选择已有的⽂件夹。如果需要存储到指定的路径,请新建⽬录。
image.png
⼀旦创建了blob store,就不可修改类型和名称。⽽且,该blob store被仓库或者仓库组使⽤后,都不可以被删除。⼀个仓库只可以使⽤⼀个Blob Store,⼀个Blob Store可以对应多个仓库。Blob store的⼤⼩为Path对应的⽂件夹的⼤⼩。
3、为Repository绑定Blob Store
在新建Repository的时候可以绑定到已有的Blob Store。⼀旦Repository创建完成就不可以再变更Blob Store。
image.png
其他
Nexus对于Maven、Yum、Docker、Npm、Python都⽀持hosted和proxy的仓库。如果考虑到备份hosted,那么可以将hosted仓库对应⼀个blob store,这样我们在备份的时候只需要备份hosted⽂件夹和配置⽂件即可。