{"id":9007,"date":"2023-10-31T20:58:26","date_gmt":"2023-10-31T20:58:26","guid":{"rendered":"https:\/\/www.linuxandotherstuff.com\/?p=9007"},"modified":"2025-06-22T14:20:19","modified_gmt":"2025-06-22T14:20:19","slug":"basic-rsync-notes","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2023\/10\/31\/basic-rsync-notes\/","title":{"rendered":"Basic rsync notes"},"content":{"rendered":"\n<p>Here are some basic rsync notes.<\/p>\n\n\n\n<p>Always remember&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>rsync interprets a directory with no trailing slash as copy this directory, and a directory with a trailing slash as copy <\/strong><\/h2>\n\n\n\n<p>This will put the contents of &#8220;foo&#8221; inside of &#8220;bar&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"43\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-05-25.png\" alt=\"\" class=\"wp-image-9010\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-05-25.png 446w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-05-25-300x29.png 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrsync -av ~\/foo\/ user@remote.com:\/var\/www\/bar\/\n<\/pre><\/div>\n\n\n<p>This command will put the directory &#8220;foo&#8221; inside of &#8220;bar&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"43\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-23-19.png\" alt=\"\" class=\"wp-image-9015\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-23-19.png 445w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-31-16-23-19-300x29.png 300w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrsync -av ~\/foo user@remote.com:\/var\/www\/bar\/\n<\/pre><\/div>\n\n\n<p>Remember&#8230;rsync interprets a directory with no trailing slash as copy this directory, and a directory with a trailing slash as copy the contents of this directory.<\/p>\n\n\n\n<p>Some things to remember<\/p>\n\n\n\n<p><br>&#8211;update, -u skip files that are newer on the receiver<br>&#8211;archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)<br>&#8211;dry-run, -n perform a trial run with no changes made<br>&#8211;progress show progress during transfer<br>-P same as &#8211;partial &#8211;progress<br>&#8211;compress, -z compress file data during the transfer<\/p>\n\n\n\n<p>Here is a good one to remember&#8230;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo rsync -avuPz &quot;\/chroot\/home\/ae482095\/restore_13000078\/mail\/&quot; &quot;\/chroot\/home\/ae482095\/var\/9ae3b27f31.nxcli.io\/mail\/&quot;\n<\/pre><\/div>\n\n\n<p>Other Notes:<\/p>\n\n\n\n<p>See: <a href=\"https:\/\/www.nexcess.net\/help\/using-rsync-for-backups\/\">https:\/\/www.nexcess.net\/help\/using-rsync-for-backups\/<\/a><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrsync -azvHP -e &quot;ssh -p 2254&quot; root@IP-Address-Of-The-Source-Server-or-Its-Hostname:\/var\/www\/wordpresstest.com\/website_backup.tar.gz \/home\/wpsite\/\n<\/pre><\/div>\n\n\n<p>site copy<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrsync -azvHP -e &quot;ssh -p 2254&quot; root@IP-Address-Of-The-Source-Server-or-Its-Hostname:\/var\/www\/wordpresstest.com\/website_backup.tar.gz \/home\/wpsite\/\n<\/pre><\/div>\n\n\n<p>sudo rsync -av html \/chroot\/home\/a2679b40\/e690d0591d.nxcli.io\/staging_files<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are some basic rsync notes. Always remember&#8230; rsync interprets a directory with no trailing slash as copy this directory, and a directory with a trailing slash as copy This will put the contents of &#8220;foo&#8221; inside of &#8220;bar&#8221;: This command will put the directory &#8220;foo&#8221; inside of &#8220;bar&#8221; Remember&#8230;rsync interprets a directory with no &#8230; <a title=\"Basic rsync notes\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2023\/10\/31\/basic-rsync-notes\/\" aria-label=\"Read more about Basic rsync notes\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,100],"tags":[],"class_list":["post-9007","post","type-post","status-publish","format-standard","hentry","category-administration","category-rsync"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=9007"}],"version-history":[{"count":6,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9007\/revisions"}],"predecessor-version":[{"id":9208,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9007\/revisions\/9208"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=9007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=9007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=9007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}