{"id":185,"date":"2015-12-07T08:38:21","date_gmt":"2015-12-07T08:38:21","guid":{"rendered":"http:\/\/alain.fi\/?p=185"},"modified":"2019-07-30T04:00:26","modified_gmt":"2019-07-30T04:00:26","slug":"tar-gz-exclude-directory","status":"publish","type":"post","link":"https:\/\/alain.fi\/?p=185","title":{"rendered":"tar gz &#8211; exclude directory"},"content":{"rendered":"<p>You want to backup some files recursively except one directory within:<\/p>\n<pre>tar cvfz live_20151207.tgz --exclude='public_html\/sites\/all\/files' public_html<\/pre>\n<p>it is important that the exclude is like that: &#8211;exclude=&#8217;public_html\/sites\/all\/files&#8217;<br \/>\nThis would FAIL:<br \/>\n&#8211;exclude=&#8217;.\/public_html\/sites\/all\/files&#8217;<\/p>\n<p>Not sure but to remember I think of it as a &#8220;text pattern&#8221;, instead of an actual path.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You want to backup some files recursively except one directory within: tar cvfz live_20151207.tgz &#8211;exclude=&#8217;public_html\/sites\/all\/files&#8217; public_html it is important that the exclude is like that: &#8211;exclude=&#8217;public_html\/sites\/all\/files&#8217; This would FAIL: &#8211;exclude=&#8217;.\/public_html\/sites\/all\/files&#8217; Not sure but to remember I think of it as &hellip; <a href=\"https:\/\/alain.fi\/?p=185\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185"}],"version-history":[{"count":2,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}