{"id":61,"date":"2016-01-28T11:42:02","date_gmt":"2016-01-28T11:42:02","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/igmit\/?p=61"},"modified":"2016-01-28T11:42:02","modified_gmt":"2016-01-28T11:42:02","slug":"rsync-quick-how-to","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/igmit\/?p=61","title":{"rendered":"rsync &#8211; quick how-to"},"content":{"rendered":"<p>OK after a few tries on safe directories and files :-<\/p>\n<pre>rsync -avz \/source\/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/<\/pre>\n<p>Replicates \/source\/with\/trailing\/slash<span style=\"color: #800080\"><span style=\"color: #ff0000\">\/<\/span> <span style=\"color: #333333\">to \/destination\/with\/trailing\/slash<\/span><\/span><\/p>\n<p>rsync -avz \/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/ however doesn&#8217;t delete missing files in \/destination that have been removed or altered in \/with\/trailing\/slash\/ over subsequent runs at a later date.<\/p>\n<pre>rsync -avz --delete --dry-run \/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/ &gt; whatwillhappen.txt<\/pre>\n<p>Will do a dry run through the source and destination and will list what it will remove on the \/destination side and writes to whatwillhappen.txt the files and directories it will delete in \/destination.<\/p>\n<pre>rsync -avz --delete \/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/<\/pre>\n<p>Syncs both \/source and \/destination &#8211; <span style=\"color: #ff0000\"><strong>Watch and Double-Check<\/strong><\/span> your typing before hitting the return key.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OK after a few tries on safe directories and files :- rsync -avz \/source\/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/ Replicates \/source\/with\/trailing\/slash\/ to \/destination\/with\/trailing\/slash rsync -avz \/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/ however doesn&#8217;t delete missing files in \/destination that have been removed or altered in \/with\/trailing\/slash\/ over subsequent runs at a later date. rsync -avz &#8211;delete &#8211;dry-run \/with\/trailing\/slash\/ \/destination\/with\/trailing\/slash\/ &gt; whatwillhappen.txt Will do <a href='https:\/\/blogs.ncl.ac.uk\/igmit\/?p=61' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":4848,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-1-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/users\/4848"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":6,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/igmit\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}