تخزين ملفات الشبكة واسترجاعها مع حماية كلمة المرور الاختيارية وضغطها باستخدام 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 ، ثم /etc/netfetch.cfg إذا لم يتم توفير a -config =/path/to/netfetch.cfg.
مثال التكوين:
[redis]
host=127.0.0.1
port=6379
db=1
بدءًا من الإصدار 3.0 ، يدعم NetFetch الضغط. يتم توفير هذا خلال NetFetchput بواسطة علامة "-الضغط".
وضع الضغط الافتراضي هو LZMA (ويعرف أيضًا باسم "LZ"). لاستخدام وضع ضغط مختلف ، حدد "-compress = mode" حيث يكون الوضع أحد LZMA/XZ ، GZIP/GZ ، BZIP2/BZ2.
يجب تحديد الضغط فقط على PUT ، وسيقوم GET تلقائيًا باكتشاف الوضع وإلغاء ضغط النتائج.
الإصدار 3.0 يتطلب فهرسة> 5.0.0 و <7.0.0. إذا كان يجب عليك استخدام إصدار أقل من 5.0.0 ، استخدم الإصدار 2.0.3.
يتوافق تنسيق البيانات المستخدمة من قبل 3.0 مع تنسيق بيانات الإصدار 2.0 ، لكنه أسقط الدعم لتنسيق 1.x. يجب أن يكون كل شيء من الآن فصاعدًا متوافقًا مع جميع الإصدارات المستقبلية.
تم تحديث الإصدار 2.0 تنسيق التخزين إلى نموذج أكثر كفاءة (يخزن مباشرة بدلاً من ترميز/فك تشفير BASE64). هذا يجعل كل شيء أسرع بكثير ويستغرق مساحة أقل ، ولكنه غير متوافق مع الإصدارات قبل 2.0. لإحضار/وضع ملف باستخدام التنسيق القديم ، استخدم "–Old-Format" مع NetFetchget/NetFetchput.
للترحيل ، قم بإحضار أي ملفات باستخدام "–Old-Format" ، ثم قم بتخزينها بدون هذه العلم. لا يوجد استخدام تلقائي ، بسبب التشفير.
يعتمد الإصدار 2.0 أيضًا على الفهرسة على الأقل الإصدار 2.9.0
يمكن العثور على http://htmlpreview.github.io/؟https://github.com/kata198/netfetch/blob/master/doc/netfetch.html.