両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
linux:rsync [2024/03/14 12:23] – [rsync で同期中に Operation not permitted のエラーが出る] ともやん | linux:rsync [2024/03/14 12:32] (現在) – [rsyncコマンドの元ディレクトリ指定の違いによる動作] ともやん |
---|
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
<html><code>/remote/server/<b class=RED>directory/</b></code></html> のように、元ディレクトリの最後に "<html><b class=RED>/</b></html>" を付けると、<html><code>directory</code></html> の内容が <html><code>20081016</code></html> 内に展開されるかたちで同期される🤔\\ | <html><code>/remote/server/<b class=RED>directory/</b></code></html> のように、元ディレクトリの最後に "<html><code><b class=RED>/</b></code></html>" を付けると、<html><code>directory</code></html> の内容が <html><code>20081016</code></html> 内に展開されるかたちで同期される🤔\\ |
\\ | \\ |
先ディレクトリに元ディレクトリ名のディレクトリが作成される例: | 先ディレクトリに元ディレクトリ名のディレクトリが作成される例: |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
<html><code>/remote/server/<b class=RED>directory</b></code></html> のように、元ディレクトリの最後に "<html><b class=RED>/</b></html>" を付けないと、<html><code>20081016</code></html> 内に <html><code>directory</code></html> が作成されてその中に同期される🤔\\ | <html><code>/remote/server/<b class=RED>directory</b></code></html> のように、元ディレクトリの最後に "<html><code><b class=RED>/</b></code></html>" を付けないと、<html><code>20081016</code></html> 内に <html><code>directory</code></html> が作成されてその中に同期される🤔\\ |
| |
===== rsync でレジューム同期を行うには? ===== | ===== rsync でレジューム同期を行うには? ===== |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
$ mkdir -p /var/www/html/ | <font color="#FF8700"><b>$</b></font> <font color="#26A269">mkdir</font> <font color="#A347BA">-p</font> <u style="text-decoration-style:single">/var/www/html/</u> |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>rsync</b> <b class=HIK>-avz --delete -e</b> /var/www/vhosts/ '/mnt/win_c-drv/Program Files (x86)/Ampps/www/vhosts/' | <font color="#FF8700"><b>$</b></font> <font color="#26A269">rsync</font> <font color="#A347BA">-avz</font> <font color="#A347BA">--delete</font> <font color="#A347BA">-e</font> /var/www/vhosts/ <font color="#A2734C">'/mnt/win_c-drv/Program Files </font><font color="#12488B"><b>(</b></font><font color="#A2734C">x86</font><font color="#12488B"><b>)</b></font><font color="#A2734C">/Ampps/www/vhosts/'</font> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>rsync</b> <b class=HIK>-avz --delete</b> /var/www/vhosts/ '/mnt/win_c-drv/Program Files (x86)/Ampps/www/vhosts/' | <font color="#FF8700"><b>$</b></font> <font color="#26A269">rsync</font> <font color="#A347BA">-avz</font> <font color="#A347BA">--delete</font> /var/www/vhosts/ <font color="#A2734C">'/mnt/win_c-drv/Program Files </font><font color="#12488B"><b>(</b></font><font color="#A2734C">x86</font><font color="#12488B"><b>)</b></font><font color="#A2734C">/Ampps/www/vhosts/'</font> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>rsync</b> <b class=HIK>-rlptvz --delete</b> /var/www/vhosts/ '/mnt/win_c-drv/Program Files (x86)/Ampps/www/vhosts/' | <font color="#FF8700"><b>$</b></font> <font color="#26A269">rsync</font> <font color="#A347BA">-rlptvz</font> <font color="#A347BA">--delete</font> /var/www/vhosts/ <font color="#A2734C">'/mnt/win_c-drv/Program Files </font><font color="#12488B"><b>(</b></font><font color="#A2734C">x86</font><font color="#12488B"><b>)</b></font><font color="#A2734C">/Ampps/www/vhosts/'</font> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |