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 서버는 구성 파일로 지정됩니다. 응용 프로그램은 첫 $ $ home/.netfetch.cfg를 확인한 다음 --config =/path/to/netfetch.cfg가 제공되지 않으면 /etc/netfetch.cfg를 확인합니다.
예제 구성 :
[redis]
host=127.0.0.1
port=6379
db=1
버전 3.0부터 NetFetch는 압축을 지원합니다. 이것은 "-코프 프레스"플래그에 의해 NetFetchput 중에 제공됩니다.
기본 압축 모드는 LZMA (일명 "LZ")입니다. 다른 압축 모드를 사용하려면 "-코프 프레스 = 모드"를 지정합니다. 여기서 모드는 LZMA/XZ, GZIP/GZ, BZIP2/BZ2 중 하나입니다.
압축은 put에만 지정하면됩니다. get은 어떤 모드를 자동으로 감지하고 결과를 압축시킵니다.
버전 3.0에는 indexedRedis> 5.0.0 및 <7.0.0이 필요합니다. 5.0.0보다 적은 버전을 사용해야하는 경우 버전 2.0.3을 사용하십시오.
3.0에서 사용하는 데이터 형식은 버전 2.0 데이터 형식과 호환되지만 1.x 형식에 대한 지원이 떨어졌습니다. 따라서 모든 것은 모든 미래 버전과 전달할 수 있어야합니다.
버전 2.0은 스토리지 형식을 훨씬 더 효율적인 형식으로 업데이트했습니다 (Base64 인코딩/디코딩 대신 직접 저장). 이것은 모든 것을 훨씬 빠르게 만들고 공간을 덜 차지하지만 2.0 이전에는 버전과 호환되지 않습니다. 이전 형식을 사용하여 파일을 가져 오려면 netfetchget/netfetchput을 사용하여 "old-format"을 사용하십시오.
마이그레이션하려면 "all-format"을 사용하여 파일을 가져온 다음 해당 플래그없이 다시 저장하십시오. 암호화로 인해 자동 유용성이 없습니다.
버전 2.0은 또한 최소 2.9.0의 indexedRedis에 따라 다릅니다.
http://htmlpreview.github.io/?https://github.com/kata198/netfetch/blob/master/doc/netfetch.html을 찾을 수 있습니다.