{"id":117570,"date":"2024-01-07T10:00:28","date_gmt":"2024-01-07T01:00:28","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=117570"},"modified":"2024-01-07T08:17:41","modified_gmt":"2024-01-06T23:17:41","slug":"windows-robocopy-drive-mirror","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/windows-robocopy-drive-mirror\/","title":{"rendered":"Windows\u306e\u300crobocopy\u300d\u3092\u5229\u7528\u3057\u3066\u30c9\u30e9\u30a4\u30d6\u5168\u4f53\u3092\u30df\u30e9\u30fc\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/01\/s_20240104_114124.jpg\" alt=\"S 20240104 114124\" title=\"s_20240104_114124.jpg\" border=\"0\" width=\"1209\" height=\"701\" \/><\/p>\n<p>Windows\u306b\u306f\u300crobocopy\u300d\u3068\u547c\u3070\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u30b3\u30d4\u30fc\u30c4\u30fc\u30eb\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Windows\u3067\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30eb\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u304c\u3001\u9014\u4e2d\u3067\u30b3\u30d4\u30fc\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u3068\u3001\u3069\u3053\u307e\u3067\u30b3\u30d4\u30fc\u3057\u305f\u304b\u5206\u304b\u3089\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>robocopy\u306e\u300c\u30df\u30e9\u30fc\u300d\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u30b3\u30d4\u30fc\u5143\u3068\u30b3\u30d4\u30fc\u5148\u3092\u6bd4\u8f03\u3057\u3001\u5b58\u5728\u3057\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u7d20\u65e9\u304f\u51e6\u7406\u3092\u5b8c\u4e86\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0brobocopy\u3092\u5229\u7528\u3057\u3066\u30c9\u30e9\u30a4\u30d6\u5168\u4f53\u3092\u30df\u30e9\u30fc\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>robocopy\u3067\u30c9\u30e9\u30a4\u30d6\u5168\u4f53\u3092\u30df\u30e9\u30fc\u3059\u308b<\/h2>\n<p>robocopy\u3067\u30c9\u30e9\u30a4\u30d6\u5168\u4f53\u3092\u30df\u30e9\u30fc\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\nrobocopy d:\\ e:\\ \/mir \/np \/xd  \"System Volume Information\" $RECYCLE.BIN \r\n<\/pre>\n<p><code>robocopy \u30b3\u30d4\u30fc\u5143 \u30b3\u30d4\u30fc\u5148 \u30aa\u30d7\u30b7\u30e7\u30f3<\/code>\u306e\u9806\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u6307\u5b9a\u3057\u3066\u3044\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>\/mir<\/strong>: \u30df\u30e9\u30fc\u30aa\u30d7\u30b7\u30e7\u30f3<\/li>\n<li><strong>\/np<\/strong>: \u30b3\u30d4\u30fc\u306e\u9032\u6357\u7387\u3092\u8868\u793a\u3057\u306a\u3044<\/li>\n<li><strong>\/xd<\/strong>: \u9664\u5916\u30d5\u30a9\u30eb\u30c0\u3092\u6307\u5b9a(\u8907\u6570\u306e\u5834\u5408\u7a7a\u767d\u533a\u5207\u308a)<\/li>\n<\/ul>\n<p>\/mir\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u30b3\u30d4\u30fc\u5148\u306e\u5185\u5bb9\u306f\u30b3\u30d4\u30fc\u5143\u3068\u5b8c\u5168\u306b\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u64cd\u4f5c\u3055\u308c\u307e\u3059\u3002\u3059\u306a\u308f\u3061\u3001\u30b3\u30d4\u30fc\u5148\u306b\u3060\u3051\u5b58\u5728\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u306f\u524a\u9664\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u30b3\u30d4\u30fc\u5143\u3001\u30b3\u30d4\u30fc\u5148\u3092\u9593\u9055\u3048\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f55\u56de\u3082\u540c\u3058\u4f5c\u696d\u3092\u884c\u3046\u5834\u5408\u3001\u51e6\u7406\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre>\r\n\r\n@echo off\r\n\r\nREM https:\/\/qiita.com\/tomotagwork\/items\/5b9e08f28d5925d96b5f\r\nsetlocal\r\n\r\ncd %~dp0\r\n\r\nset SRCDRIVE=h:\r\nset SRCVOLUME=Backup1\r\nset DSTDRIVE=i:\r\nset DSTVOLUME=Backup2\r\n\r\nfor \/f \"tokens=5\" %%v in ('vol %SRCDRIVE%') do (\r\n   set vol1=%%v\r\n   goto done1\r\n)\r\n:done1\r\n\r\nif not %SRCVOLUME% == %vol1% (\r\n  echo src not ok\r\n  exit \/b\r\n) else (\r\n  echo %SRCDRIVE%SRCVOLUME% ok\r\n)\r\n\r\nfor \/f \"tokens=5\" %%v in ('vol %DSTDRIVE%') do (\r\n   set vol2=%%v\r\n   goto done2\r\n)\r\n:done2\r\n\r\nif not %DSTVOLUME% == %vol2% (\r\n  echo dst not ok\r\n  exit \/b\r\n) else (\r\n  echo %DSTDRIVE%DSTVOLUME% ok\r\n)\r\n\r\nrobocopy %SRCDRIVE%\\ %DSTDRIVE%\\ \/mir \/np \/xd  \"System Volume Information\" $RECYCLE.BIN \r\n<\/pre>\n<p>SRCDRIVE(\u30b3\u30d4\u30fc\u5143\u30c9\u30e9\u30a4\u30d6\u540d)\u3001SRCVOLUME(\u30b3\u30d4\u30fc\u5143\u30dc\u30ea\u30e5\u30fc\u30e0\u540d)\u3001DSTDRIVE(\u30b3\u30d4\u30fc\u5148\u30c9\u30e9\u30a4\u30d6\u540d)\u3001DSTVOLUME(\u30b3\u30d4\u30fc\u5148\u30dc\u30ea\u30e5\u30fc\u30e0\u540d)\u3092\u9069\u5207\u306b\u66f8\u304d\u63db\u3048\u3001\u5185\u5bb9\u3092\u4f8b\u3048\u3070<code>mirror.cmd<\/code>\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u30b3\u30d4\u30fc\u5143\u3068\u30b3\u30d4\u30fc\u5148\u306e\u9593\u9055\u3044\u3092\u9632\u3050\u305f\u3081\u3001\u305d\u308c\u305e\u308c\u306e\u30c9\u30e9\u30a4\u30d6\u306b\u30dc\u30ea\u30e5\u30fc\u30e0\u540d(Backup1\u3001Backup2)\u3092\u4ed8\u3051\u3001\u6307\u5b9a\u3055\u308c\u305f\u30c9\u30e9\u30a4\u30d6\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u540d\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f8c\u306f\u4fdd\u5b58\u3057\u305f\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u307e\u3059(\u3044\u304d\u306a\u308a\u672c\u756a\u74b0\u5883\u3067\u5b9f\u884c\u305b\u305a\u3001\u30c6\u30b9\u30c8\u7528\u306e\u30c9\u30e9\u30a4\u30d6\u3092\u6e96\u5099\u3057\u3066\u8a66\u3059\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059)\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/01\/s_20240104_121755.jpg\" alt=\"S 20240104 121755\" title=\"s_20240104_121755.jpg\" border=\"0\" width=\"1248\" height=\"701\" \/><\/p>\n<p>\u25b2\u30b3\u30de\u30f3\u30c9\u304c\u7d42\u4e86\u3059\u308c\u3070\u30df\u30e9\u30fc\u5b8c\u4e86\u3067\u3059\u3002\u5931\u6557\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u5b58\u5728\u3057\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u521d\u56de\u306f\u305d\u308c\u306a\u308a\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u304c\u3001\u9014\u4e2d\u3067\u4e2d\u65ad\u3057\u305f\u3068\u3057\u3066\u3082\u518d\u5ea6\u5b9f\u884c\u3059\u308c\u3070\u7d9a\u304d\u304b\u3089\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/01\/s_20240104_121905.jpg\" alt=\"S 20240104 121905\" title=\"s_20240104_121905.jpg\" border=\"0\" width=\"1216\" height=\"706\" \/><\/p>\n<p>\u25b2\u4e8c\u56de\u76ee\u4ee5\u964d\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30c1\u30a7\u30c3\u30af\u3060\u3051\u3067\u3059\u3050\u306b\u51e6\u7406\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Windows\u306e\u300crobocopy\u300d\u3092\u5229\u7528\u3057\u3066\u30c9\u30e9\u30a4\u30d6\u5168\u4f53\u3092\u30df\u30e9\u30fc\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\/mir\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u30b3\u30d4\u30fc\u5148\u306e\u5185\u5bb9\u304c\u6d88\u3048\u308b\u3053\u3068\u304c\u3042\u308b\u5371\u967a\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001\u6b63\u3057\u304f\u904b\u7528\u3067\u304d\u308c\u3070\u5927\u5909\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>robocopy\u306b\u306f\u4ed6\u306b\u3082\u591a\u6570\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5b58\u5728\u3057\u3001\u8a73\u7d30\u306f<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/windows-server\/administration\/windows-commands\/robocopy\">Microsoft Learn<\/a>\u3067\u78ba\u8a8d\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>Windows 11\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u60c5\u5831\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/softantenna.com\/blog\/windows11\/\">https:\/\/softantenna.com\/blog\/windows11\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows\u306b\u306f\u300crobocopy\u300d\u3068\u547c\u3070\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u30b3\u30d4\u30fc\u30c4\u30fc\u30eb\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Windows\u3067\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30eb\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u304c\u3001\u9014\u4e2d\u3067\u30b3\u30d4\u30fc\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":117667,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[3298,2701,4387],"class_list":["post-117570","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-windows","tag-windows10","tag-windows11"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/117570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=117570"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/117570\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/117667"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=117570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=117570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=117570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}