/¶à¹úÓïÑÔ/
/ÖÐÎÄ/
/Ó¢ÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
qrsync ÊÇÒ»¸ö¸ù¾ÝÆßÅ£ÔÆ´æ´¢APIʵÏֵļòÒ×ÃüÁîÐи¨ÖúÉÏ´«Í¬²½¹¤¾ß£¬Ö§³Ö¶ÏµãÐøÉÏ´«£¬ÔöÁ¿Í¬²½£¬Ëü¿É½«Óû§±¾µØµÄijĿ¼µÄÎļþͬ²½µ½ÆßÅ£ÔÆ´æ´¢ÖУ¬Í¬²½»òÉÏ´«¼¸°ÙGBÉõÖÁÉÏTBµÄÎļþºÁÎÞѼÀæ¡£
±»Í¬²½µÄÎļþÃûºÍ·¾¶±ØÐëÊÇutf8±àÂë
·Çutf8µÄÎļþÃûºÍ·¾¶½«»áͬ²½Ê§°Ü¡£
Windows ϵͳÓû§ÔÚ [¿ªÊ¼] ²Ëµ¥À¸Ñ¡Ôñ [ÔËÐÐ] ÊäÈë cmd »Ø³µ¼´¿É´ò¿ª DOS ÃüÁîÐд°¿Ú£¬È»ºóÇл»µ½ qrsync.exe µÄËùÔÚ´ÅÅÌ·¾¶¡£¼ÙÉèÄãµÄ qrsync.exe ´æ·ÅÔÚ F:\tools\qrsync.exe£¬ÄÇôÈçϼ¸ÐÐÃüÁî¿ÉÒÔÇл»µ½ qrsync.exe ´æ·ÅµÄĿ¼£º
> F:
> cd tools
ÏȽ¨Á¢Ò»¸öÅäÖÃÎļþ£¨JSON¸ñʽ£©£¬±ÈÈç½Ðconf.json£¬ÄÚÈÝÈçÏ£º
{
"src": "/home/your/sync_dir",
"dest": "qiniu:access_key=<AccessKey>
&secret_key=<SecretKey>
&bucket=<Bucket>
&key_prefix=<KeyPrefix>
&persistent_ops=<PersistentOps>
&persistent_pipeline=<PersistentPipeline>
&persistent_notify_url=<PersistentNotifyUrl>
&...
",
"debug_level": 1
}
ÆäÖУ¬AccessKey ºÍ SecretKey ÐèÒªÔÚÆßÅ£¿ª·¢Õßƽ̨ÉÏÉêÇë¡£²½ÖèÈçÏ£º
1.¿ªÍ¨ÆßÅ£¿ª·¢ÕßÕʺš£
2.µÇ¼ÆßÅ£¹ÜÀí¿ØÖÆ̨£¬²é¿´ Access Key ºÍ Secret Key¡£
×¢Ò⣺ÇÐÎð½«ÅäÖÃÎļþ±£´æÔÚ±»Í¬²½µÄĿ¼ÖУ¬·ñÔò»á´øÀ´Ð¹Â¶SecretKeyµÄ·çÏÕ¡£
¿ÉÒÔÔÚ ÆßÅ£¿ª·¢Õßƽ̨ ½øÐÐÏàÓ¦µÄÓòÃû°ó¶¨²Ù×÷£¬ÓòÃû°ó¶¨³É¹¦ºó£¬ÈôÄú½« bucket ÉèΪ¹«Óã¨public£©ÊôÐÔ£¬Ôò¿ÉÒÔÓÃÈçÏ·½Ê½¶ÔÉÏ´«µÄÎļþ½øÐзÃÎÊ£º
http://<°ó¶¨ÓòÃû>/<key>
key ¼´ÊÇ src Àï±ßÎļþÃû»òÎļþµÄÏà¶Ô·¾¶£¬key ¿ÉÒÔ°üº¬Ð±¸Üµ«²»ÄÜÒÔб¸Ü¿ªÍ·¡£±ÈÈç src ´æÔÚÎļþ a.txt ºÍ a/b/c.txt£¬ÇҰ󶨵ÄÓòÃûΪ foo.qiniudn.com£¬ÄÇô¼´¿ÉÓÃÈçÏ·¾¶·ÃÎÊ£º
http://foo.qiniudn.com/a.txt
http://foo.qiniudn.com/a/b/c.txt
ÔÚ½¨Á¢Íê conf.json ÅäÖÃÎļþºó£¬¾Í¿ÉÒÔÔËÐÐ qrsync ³ÌÐò½øÐÐͬ²½¡£
Unix/Linux/MacOS ϵͳ¿ÉÒÔÓÃÈçÏÂÃüÁîÐУº
$ qrsync /path/to/your-conf.json
WindowsÓû§½øÈëµ½ qrsync.exe ËùÔÚĿ¼ºóÔËÐÐÈçÏÂÃüÁî¼´¿É£º
> qrsync.exe /path/to/your-conf.json
ÐèҪעÒâµÄÊÇ£¬qrsync ÊÇÔöÁ¿Í¬²½µÄ£¬Èç¹ûÄãÉÏÒ»´Îͬ²½³É¹¦ºóÐÞ¸ÄÁ˲¿·ÖÎļþ£¬ÄÇôÔÙ´ÎÔËÐÐ qrsync ʱֻͬ²½ÐÂÔöµÄºÍ±»Ð޸ĵÄÎļþ¡£µ±È»£¬Èç¹ûÉÏÒ»´Îͬ²½¹ý³Ì³ö´íÁË£¬Ò²¿ÉÒÔÖØÐÂÔËÐÐ qrsync ³ÌÐò¼ÌÐøͬ²½¡£
¹ØÓÚÌÚÅ£ | ÁªÏµ·½Ê½ | ·¢Õ¹Àú³Ì | °æȨÉùÃ÷ | ÏÂÔØ°ïÖú(£¿) | ¹ã¸æÁªÏµ | ÍøÕ¾µØͼ | ÓÑÇéÁ´½Ó
Copyright 2005-2022 QQTN.com ¡¾ÌÚÅ£Íø¡¿ °æȨËùÓÐ ¶õICP±¸2022005668ºÅ-1 | ¶õ¹«Íø°²±¸ 42011102000260ºÅ
ÉùÃ÷£º±¾Õ¾·ÇÌÚѶQQ¹Ù·½ÍøÕ¾ ËùÓÐÈí¼þºÍÎÄÕÂÀ´×Ô»¥ÁªÍø ÈçÓÐÒìÒé ÇëÓë±¾Õ¾ÁªÏµ ±¾Õ¾Îª·ÇÓ®ÀûÐÔÍøÕ¾ ²»½ÓÊÜÈκÎÔÞÖúºÍ¹ã¸æ