{"id":14,"date":"2011-05-19T21:27:44","date_gmt":"2011-05-19T20:27:44","guid":{"rendered":"http:\/\/www.phillips321.co.uk\/?p=14"},"modified":"2012-04-12T12:48:15","modified_gmt":"2012-04-12T11:48:15","slug":"sync-to-directories","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2011\/05\/19\/sync-to-directories\/","title":{"rendered":"Sync 2 directories"},"content":{"rendered":"<p>This will verbosely sync the 2 directories locally<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\">rsync <span class=\"re5\">--delete<\/span> <span class=\"re5\">--progress<\/span> <span class=\"re5\">--sparse<\/span> <span class=\"re5\">-va<\/span> <span class=\"sy0\">\/<\/span>dir<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>source<span class=\"sy0\">\/<\/span> <span class=\"sy0\">\/<\/span>dir<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>destination<span class=\"sy0\">\/<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>And to do the same thing over SSH:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\">rsync <span class=\"re5\">--sparse<\/span> <span class=\"re5\">--progress<\/span> <span class=\"re5\">-avc<\/span> <span class=\"re5\">-e<\/span> <span class=\"kw2\">ssh<\/span> user<span class=\"sy0\">@<\/span>example.com:<span class=\"sy0\">\/<\/span>dir<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span><span class=\"kw3\">source<\/span> <span class=\"sy0\">\/<\/span>dir<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>destination<span class=\"sy0\">\/<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This will verbosely sync the 2 directories locally 1rsync &#8211;delete &#8211;progress &#8211;sparse -va \/dir\/of\/source\/ \/dir\/of\/destination\/ And to do the same thing over SSH: 1rsync &#8211;sparse &#8211;progress -avc -e ssh user@example.com:\/dir\/of\/source \/dir\/of\/destination\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,3],"tags":[10,5,16],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/14"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":7,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":608,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/14\/revisions\/608"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}