使用REDIS进行可选的密码保护和压缩的网络文件存储和检索。
文件以始终主机名和文件名的绝对路径存储。
文件可以用密码存储,其中将其加密,并且必须使用相同的密码检索数据。
使用NetFetchput存储文件。
Usage: netFetchPut (options) [absolute filename]
Stores a given file in NetFetch, optionally password-protecting it as well.
Options:
--password Prompt for password on storing this file
--password-file=fname Read password from a given filename instead of tty. Implies --password.
--no-preserve Do not store owner/group/mode information
--config=/path/x.cfg Use provided config for redis. Default is to look in ~/.netfetch.cfg then /etc/netfetch.cfg
--compress(=mode) Compress the file data for storage (and decompress after fetch).
Default compression mode is lzma.
Use just --compress for this default mode.
You can specify an alternate mode by appending =MODE after --compress.
Supported modes are: 'lzma' (aka xz) 'gzip' 'bzip2'
Provided filename is treated as an absolute path. You can use a relative path, but it will be expanded
to absolute for storage. Upon fetch, you can use the same relative path, so long as it resolves
to the same absolute location. It is safest to just specify an absolute path yourself.
Example: netFetchPut /Data/myfile.db
使用Netfetchget检索文件
Usage: netFetchGet (options) [hostname] [filename] [output filename]
Downloads a file uploaded from hostname, given an absolute filename.
If "output filename" is "--", output will be to stdout.
Options:
--password Prompts for password. If file is encrypted, a password must be provided.
--password-file=fname Read password from a given filename instead of tty. Implies --password.
--no-preserve Do not apply stored attributes (owner/group/mode)
--config=/path/config.cfg Use provided config for redis. Default is to look in ~/.netfetch.cfg then /etc/netfetch.cfg
Provided filename is treated as an absolute path. You can use a relative path, but it will be expanded
to absolute for storage. Upon fetch, you can use the same relative path, so long as it resolves
to the same absolute location. It is safest to just specify an absolute path yourself.
Example: netFetchGet filestore01 /Data/myfile.db
使用NetfetchDelete删除文件
Usage: netFetchDelete (options) [hostname] [filename]
Deletes a NetFetch file off of provided hostname.
Options:
--config=/path/config.cfg Use provided config for redis. Default is to look in ~/.netfetch.cfg then /etc/netfetch.cfg
Provided filename is treated as an absolute path. You can use a relative path, but it will be expanded
to absolute for storage. Upon fetch, you can use the same relative path, so long as it resolves
to the same absolute location. It is safest to just specify an absolute path yourself.
Example: netFetchDelete filestore01 /Data/myfile.db
配置文件指定要连接的Redis服务器。如果未提供-config =/path/to/netfetch.cfg,则应用程序将检查第一个$ home/.netfetch.cfg,然后是/etc/netfetch.cfg。
示例配置:
[redis]
host=127.0.0.1
port=6379
db=1
从3.0版开始,Netfetch支持压缩。这是在Netfetchput期间由“ - 镇压”标志提供的。
默认压缩模式是LZMA(又称“ LZ”)。要使用不同的压缩模式,请指定“ -Compress =模式”,其中模式是LZMA/XZ,GZIP/GZ,BZIP2/BZ2之一。
仅在PUT上指定压缩,获取将自动检测到哪种模式并解压缩结果。
版本3.0要求索引> 5.0.0和<7.0.0。如果您必须使用版本低于5.0.0,请使用2.0.3版。
3.0使用的数据格式与2.0版的数据格式兼容,但已删除对1.x格式的支持。从此以后,一切都应该与所有未来版本具有前瞻性兼容。
2.0版将存储格式更新为更有效的表单(直接存储而不是基本64编码/解码)。这使得一切都更快,占用更少的空间,但与2.0之前的版本不兼容。要使用旧格式获取/放置文件,请与NetFetchget/NetFetchput一起使用“ - old-format”。
要迁移,请使用“ -Old-format”获取任何文件,然后在没有该标志的情况下将它们存储回。由于加密而没有自动util。
2.0版还取决于至少版本2.9.0的索引。
可以找到http://htmlpreview.github.io/?https://github.com/kata198/netfetch/blob/master/master/master/doc/doc/netfetch.html。