{"id":5451,"date":"2022-08-02T09:44:49","date_gmt":"2022-08-02T00:44:49","guid":{"rendered":"\/blog\/?p=5451"},"modified":"2026-01-02T10:36:32","modified_gmt":"2026-01-02T01:36:32","slug":"rsync-%eb%94%94%eb%a0%89%ed%86%a0%eb%a6%ac-%eb%b3%b5%ec%82%ac-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=5451","title":{"rendered":"rsync \ub514\ub809\ud1a0\ub9ac \ubcf5\uc0ac \uc2a4\ud06c\ub9bd\ud2b8"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@ECHO OFF\nREM ------------------------------------------------------------------\nREM\nREM rsync \ub514\ub809\ud1a0\ub9ac \ubcf5\uc0ac \uc2a4\ud06c\ub9bd\ud2b8\nREM\nREM ------------------------------------------------------------------\n\nREM ########################################################\nREM # UTF-8\ub85c \ucf54\ub4dc\ud398\uc774\uc9c0 \ubcc0\uacbd\nREM ########################################################\nCHCP 65001\n\nREM ------------------------------------------------------------------\nREM  \uae30\ubcf8 \uc124\uc815\nREM  ------------------------------------------------------------------\nSET \"RSYNC_CMD=C:\\PortableApps\\cmd_cygwin\\bin\\rsync.exe\"\nSET \"SRCDIR=M:\\backup\\games\"\nSET \"DSTDIR=X:\\backup\"\nSET \"LOGDIR=D:\\downloads\\logs\"\n\nECHO ------------------------------------------------------------------\nECHO \uc708\ub3c4\uc6b0 \uacbd\ub85c\ub97c cygwin \uacbd\ub85c\ub85c \ubcc0\ud658\nECHO ------------------------------------------------------------------\nFOR \/F \"TOKENS=* USEBACKQ\" %%F IN (`cygpath %SRCDIR%`) DO (SET CYGWIN_SRC=%%F)\nFOR \/F \"TOKENS=* USEBACKQ\" %%F IN (`cygpath %DSTDIR%`) DO (SET CYGWIN_DST=%%F)\nECHO %CYGWIN_SRC%\nECHO %CYGWIN_DST%\n\nECHO ------------------------------------------------------------------\nECHO rsync \ubc31\uc5c5 \uc2e4\ud589\nECHO ------------------------------------------------------------------\nIF NOT EXIST %LOGDIR% MKDIR %LOGDIR%\nECHO %RSYNC_CMD% -azvh --log-file=\"%LOGDIR%\\rsync.log\" \"%CYGWIN_SRC%\" \"%CYGWIN_DST%\"\n%RSYNC_CMD% -azvh --log-file=\"%LOGDIR%\\rsync.log\" \"%CYGWIN_SRC%\" \"%CYGWIN_DST%\"<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#!\/bin\/bash\n\n# \uae30\ubcf8 \uc124\uc815\n# \uc544\ub798\ub294 \/mnt\/sdb1\/ \uc544\ub798 \ubaa8\ub4e0 \ud30c\uc77c\uacfc \ub514\ub809\ud1a0\ub9ac\ub97c\n# \/var\/_backup\/share \ubc11\uc5d0 \uadf8\ub300\ub85c \ubcf5\uc0ac\ud55c\ub2e4.\nSRCDIR=\"\/mnt\/sdb1\/\"\nDSTDIR=\"\/var\/_backup\/share\"\nLOGDIR=\"\/var\/log\"\n\necho \"Source Directory: $SRCDIR\"\necho \"Destination Directory: $DSTDIR\"\necho \"------------------------------------------------------------------\"\necho \"rsync \ubc31\uc5c5 \uc2e4\ud589\"\necho \"------------------------------------------------------------------\"\n\n# \ub85c\uadf8 \ub514\ub809\ud1a0\ub9ac\uac00 \uc5c6\uc73c\uba74 \uc0dd\uc131\nif [ ! -d \"$LOGDIR\" ]; then\n    mkdir -p \"$LOGDIR\"\nfi\n\n# rsync \ubc31\uc5c5 \uba85\ub839 \uc2e4\ud589\nrsync -azvh --log-file=\"$LOGDIR\/rsync.log\" \"$SRCDIR\" \"$DSTDIR\"<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[40,15],"tags":[],"class_list":["post-5451","post","type-post","status-publish","format-standard","hentry","category-os_win","category-computing_tools"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5451"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5451\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}