Penyimpanan dan pengambilan file jaringan dengan perlindungan dan kompresi kata sandi opsional menggunakan REDIS.
File disimpan dengan kunci nama host yang berasal dan jalur absolut ke nama file.
File dapat disimpan dengan kata sandi, di mana mereka dienkripsi dan kata sandi yang sama harus digunakan untuk mengambil data.
Simpan file menggunakan 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
Ambil file menggunakan 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
Hapus file menggunakan 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
Server Redis yang akan terhubung ditentukan oleh file konfigurasi. Aplikasi akan memeriksa $ home/.netfetch.cfg pertama, lalu /etc/netfetch.cfg jika a --config =/path/to/netfetch.cfg tidak disediakan.
Contoh konfigurasi:
[redis]
host=127.0.0.1
port=6379
db=1
Dimulai dengan versi 3.0, NetFetch mendukung kompresi. Ini disediakan selama NetFetchput oleh flag "--compress".
Mode kompresi default adalah LZMA (alias "LZ"). Untuk menggunakan mode kompresi yang berbeda, tentukan "--compress = mode" di mana mode adalah salah satu dari LZMA/XZ, GZIP/GZ, BZIP2/BZ2.
Kompresi hanya perlu ditentukan pada put, dapatkan secara otomatis mendeteksi mode mana dan mendekompres hasilnya.
Versi 3.0 membutuhkan IndexedRedis> 5.0.0 dan <7.0.0. Jika Anda harus menggunakan versi kurang dari 5.0.0, gunakan versi 2.0.3.
Format data yang digunakan oleh 3.0 kompatibel dengan format data versi 2.0, tetapi telah menjatuhkan dukungan untuk format 1.x. Segala sesuatu untuk selanjutnya harus kompatibel ke depan dengan semua versi masa depan.
Versi 2.0 memperbarui format penyimpanan ke bentuk yang jauh lebih efisien (langsung menyimpan daripada base64-encoding/decoding). Ini membuat semuanya lebih cepat dan mengambil lebih sedikit ruang, tetapi tidak sesuai dengan versi sebelum 2.0. Untuk mengambil/meletakkan file menggunakan format lama, gunakan "--old-format" dengan NetFetchget/NetFetchput.
Untuk bermigrasi, mengambil file apa pun menggunakan "--old-format", dan kemudian menyimpannya kembali tanpa bendera itu. Tidak ada util otomatis, karena enkripsi.
Versi 2.0 juga tergantung pada indeksedredis setidaknya versi 2.9.0
Dapat ditemukan http://htmlpreview.github.io/?https://github.com/kata198/netfetch/blob/master/doc/netfetch.html.