Almacenamiento y recuperación de archivos en red con protección y compresión de contraseña opcionales utilizando Redis.
Los archivos se almacenan con una clave de nombre de host de origen y una ruta absoluta al nombre de archivo.
Los archivos se pueden almacenar con una contraseña, en la que están encriptados y se debe usar la misma contraseña para recuperar los datos.
Almacene los archivos con 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
Recuperar archivos usando 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
Eliminar archivos usando 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
El servidor Redis en el que conectarse se especifica mediante un archivo de configuración. Las aplicaciones verificarán primero $ home/.netfetch.cfg, entonces /etc/netfetch.cfg si no se proporciona un --config =/path/to/netfetch.cfg.
Configuración de ejemplo:
[redis]
host=127.0.0.1
port=6379
db=1
Comenzando con la versión 3.0, NetFetch admite compresión. Esto se proporciona durante NetFetchpp por el indicador "--Compress".
El modo de compresión predeterminado es LZMA (también conocido como "LZ"). Para usar un modo de compresión diferente, especifique "--compress = modo" donde el modo es uno de LZMA/XZ, GZIP/GZ, BZIP2/BZ2.
La compresión solo se debe especificar en PUT, Get detectará automáticamente qué modo y descomprimirá los resultados.
La versión 3.0 requiere indexedredis> 5.0.0 y <7.0.0. Si debe usar una versión menos que 5.0.0, use la versión 2.0.3.
El formato de datos utilizado por 3.0 es compatible con el formato de datos de la versión 2.0, pero ha eliminado el soporte para el formato 1.x. Todo en adelante debe ser compatible con el avance con todas las versiones futuras.
La versión 2.0 actualizó el formato de almacenamiento a una forma mucho más eficiente (almacena directamente en lugar de codificación/decodificación de Base64). Esto hace que todo sea mucho más rápido y ocupa menos espacio, pero es incompatible con versiones anteriores a 2.0. Para obtener/poner un archivo usando el formato anterior, use "--dold-format" con netfetchget/netfetchput.
Para migrar, obtenga cualquier archivo usando "--lold-format", y luego guárdelos sin esa bandera. No hay un UTIT automático, debido al cifrado.
La versión 2.0 también depende de indexedredis de al menos la versión 2.9.0
Se puede encontrar http://htmlpreview.github.io/?https://github.com/kata198/netfetch/blob/master/doc/netfetch.html.