使用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。