{"id":476,"date":"2018-10-01T15:26:46","date_gmt":"2018-10-01T13:26:46","guid":{"rendered":"https:\/\/blog.chloesoe.ch\/?p=476"},"modified":"2024-07-18T17:04:24","modified_gmt":"2024-07-18T15:04:24","slug":"rsync-through-ssh","status":"publish","type":"post","link":"https:\/\/blog.chloesoe.ch\/?p=476","title":{"rendered":"rsync through SSH"},"content":{"rendered":"<p>If you want to RSYNC through SSH and there are probably a lot of data, then use following steps:<\/p>\n<p>Install <em>screen<\/em>, so you can exit your SSH session during rsyncing.<\/p>\n<p>Open scren:<\/p>\n<pre><code>screen<\/code><\/pre>\n<p>Start a rsync from remote to your local dir:<\/p>\n<pre><code>rsync -av -e ssh username@ipadressordns:\/remote\/his\/folder \/home\/my\/folder\/ > rsync.log 2>&1<\/code><\/pre>\n<p>after you started this, use CTRL+Z and with the command `bg` you make sure, the command is running in the background.<br \/>\nnow you can use tail, to stalk the progress of the sync<\/p>\n<pre><code>tail -f rsync.log<\/pre>\n<p><\/cotail -f rsync.log<\/code><\/p>\n<p>you can leave the screen with <em>CTRL+A then D<\/em> and you can exit the SSH connection and go having a beer.<br \/>\nThe next day you can look at your syncing with:<\/p>\n<pre><code># resume screen from day before\nscreen -r\n\n# put sync command in foreground (if it is still running)\nfg\n\n# check sync file\nvim rsync.log\n\n# start another sync like above, to make sure, everything was synced correctly<\/code><\/pre>\n<p>helpful: &lt;a href=&quot;<a href=\"http:\/\/troy.jdmz.net\/rsync\/index.html&amp;quot;&amp;gt;http:\/\/troy.jdmz.net\/rsync\/index.html&amp;lt;\/a&amp;gt\">http:\/\/troy.jdmz.net\/rsync\/index.html&quot;&gt;http:\/\/troy.jdmz.net\/rsync\/index.html&lt;\/a&gt<\/a>;<\/p>\n<h2>Rsync with Sudo on Remote<\/h2>\n<pre><code>rsync -av -e \"ssh\" --rsync-path=\"sudo rsync\" \/source\/ user@server.com:\/destination\/<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you want to RSYNC through SSH and there are probably a lot of data, then use following steps: Install screen, so you can exit your SSH session during rsyncing. Open scren: screen Start a rsync from remote to your local dir: rsync -av -e ssh username@ipadressordns:\/remote\/his\/folder \/home\/my\/folder\/ > rsync.log 2>&#038;1 after you started this,&#8230; <a href=\"https:\/\/blog.chloesoe.ch\/?p=476\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">rsync through SSH<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-476","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=476"}],"version-history":[{"count":13,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/476\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/476\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}