{"id":7691,"date":"2018-08-17T09:47:20","date_gmt":"2018-08-17T01:47:20","guid":{"rendered":"http:\/\/rmohan.com\/?p=7691"},"modified":"2018-08-17T09:47:20","modified_gmt":"2018-08-17T01:47:20","slug":"rsync-increment-data","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7691","title":{"rendered":"rsync increment data"},"content":{"rendered":"<p>command will copy increment data and keep it in sync with remote server.<\/p>\n<ol>\n<li>It will copy only incremental data.<\/li>\n<li>It will delete if any data deleted from source.<\/li>\n<li>It will copy again from source if any data deleted at destination.<\/li>\n<li>basically this command will keep the both environment in sync.<\/li>\n<\/ol>\n<p><code>rsync -avWe ssh --delete-before (source) root@localhost:(destination)<br \/>\n rsync -avW --delete-before -e ssh (source) root@localhost:(destination)<\/code><\/p>\n<p>Example:<\/p>\n<pre><code>rsync -avWe ssh --delete-before \/data root@192.168.1.4:\/data\r\nrsync -avW --delete-before -e ssh \/data root@192.168.1.4:\/data\r\n\r\n\r\n<\/code><\/pre>\n<p>To delete files in the target, add the\u00a0<code>--delete<\/code>\u00a0option to your command. For example:<\/p>\n<pre><code><\/code><\/pre>\n<pre><code>rsync -avh source\/ dest\/ --delete<\/code>\r\n\r\n<\/pre>\n<pre><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>command will copy increment data and keep it in sync with remote server.<\/p>\n<p> It will copy only incremental data. It will delete if any data deleted from source. It will copy again from source if any data deleted at destination. basically this command will keep the both environment in sync. <\/p>\n<p>rsync -avWe ssh &#8211;delete-before (source) [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7691"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7691"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7691\/revisions"}],"predecessor-version":[{"id":7692,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7691\/revisions\/7692"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}