{"id":1721,"date":"2018-03-23T07:49:35","date_gmt":"2018-03-23T11:49:35","guid":{"rendered":"http:\/\/shirishranjit.com\/blog1\/?page_id=1721"},"modified":"2018-03-23T07:54:01","modified_gmt":"2018-03-23T11:54:01","slug":"backing-up-your-data-with-rsync-in-mac-and-linux","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/technical-posts\/linux-tidbits\/backing-up-your-data-with-rsync-in-mac-and-linux","title":{"rendered":"Backing up your data with rsync in Mac and Linux"},"content":{"rendered":"<p>rsync is a file transfer program capable of efficient remote updatevvia a fast differencing algorithm.<\/p>\n<p>Simplest way to sync up your directory without overriding the new files in the destination is:<br \/>\n<code><br \/>\nrsync -vrupogt temp\/ temp2\/<br \/>\n<\/code><\/p>\n<p>for dry run<\/p>\n<pre>\r\n<code>\r\n- n is dry nun\r\nrsync -vrupogt temp\/ temp2\/\r\n\r\nHere is the description of options:\r\n\r\n-r, --recursive             recurse into directories\r\n-u, --update                skip files that are newer on the receiver\r\n     --inplace               update destination files in-place (SEE MAN PAGE)\r\n     --append                append data onto shorter files\r\n     --append-verify         like --append, but with old data in file checksum\r\n\r\n-p, --perms                 preserve permissions\r\n-o, --owner                 preserve owner (super-user only)\r\n -g, --group                 preserve group\r\n     --devices               preserve device files (super-user only)\r\n     --specials              preserve special files\r\n-t, --times                 preserve modification times\r\n\r\n<\/code>\r\n<\/pre>\n<p>Here is the doc from rsync man page:<\/p>\n<p>Usage: rsync [OPTION]&#8230; SRC [SRC]&#8230; DEST<br \/>\n  or   rsync [OPTION]&#8230; SRC [SRC]&#8230; [USER@]HOST:DEST<br \/>\n  or   rsync [OPTION]&#8230; SRC [SRC]&#8230; [USER@]HOST::DEST<br \/>\n  or   rsync [OPTION]&#8230; SRC [SRC]&#8230; rsync:\/\/[USER@]HOST[:PORT]\/DEST<br \/>\n  or   rsync [OPTION]&#8230; [USER@]HOST:SRC [DEST]<br \/>\n  or   rsync [OPTION]&#8230; [USER@]HOST::SRC [DEST]<br \/>\n  or   rsync [OPTION]&#8230; rsync:\/\/[USER@]HOST[:PORT]\/SRC [DEST]<\/p>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Backing+up+your+data+with+rsync+in+Mac+and+Linux\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/linux-tidbits\/backing-up-your-data-with-rsync-in-mac-and-linux\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>rsync is a file transfer program capable of efficient remote updatevvia a fast differencing algorithm. Simplest way to sync up your directory without overriding the new files in the destination is: rsync -vrupogt temp\/ temp2\/ for dry run &#8211; n &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/linux-tidbits\/backing-up-your-data-with-rsync-in-mac-and-linux\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":292,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1721","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1721"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=1721"}],"version-history":[{"count":4,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1721\/revisions"}],"predecessor-version":[{"id":1725,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1721\/revisions\/1725"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/292"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=1721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}