{"id":461,"date":"2012-08-07T01:27:19","date_gmt":"2012-08-07T09:27:19","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=461"},"modified":"2012-08-07T01:27:19","modified_gmt":"2012-08-07T09:27:19","slug":"finding-win7-junctions-and-rsync","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2012\/08\/07\/finding-win7-junctions-and-rsync\/","title":{"rendered":"finding Win7 junctions and rsync"},"content":{"rendered":"<p>Thanks to BigSmoke for informing me on Win7 junction points and how to skip them when using rsync (deltacopy)<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"9wNqUIJWKi\"><p><a href=\"https:\/\/blog.bigsmoke.us\/2011\/01\/10\/finding-junction-files-in-windows-7-and-exclude-them-with-deltacopy\">Finding junction files in Windows 7 and exclude them with DeltaCopy<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Finding junction files in Windows 7 and exclude them with DeltaCopy&#8221; &#8212; BigSmoke\" src=\"https:\/\/blog.bigsmoke.us\/2011\/01\/10\/finding-junction-files-in-windows-7-and-exclude-them-with-deltacopy\/embed#?secret=V23txvOZuf#?secret=9wNqUIJWKi\" data-secret=\"9wNqUIJWKi\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p style=\"padding-left: 30px;\">To identify junction files, run:<\/p>\n<pre style=\"padding-left: 30px;\"><a href=\"http:\/\/www.php.net\/dir\">dir<\/a> \/AL \/s<\/pre>\n<blockquote>\n<p style=\"padding-left: 30px;\">Here is an example exclude list for deltacopy for a standard windows 7 machine. Path names are specified assuming every user dir is supplied as separate dir to copy (because there are references to root, like \u2018\/Mijn documenten\u2019:<\/p>\n<pre style=\"padding-left: 30px;\">--delete-excluded --exclude \"\/Application Data\" --exclude \"**\/Downloads\"\n\u00a0--exclude \"**\/AppData\/Local\/Application Data\" --exclude \"\/Local Settings\"\n\u00a0--exclude \"**\/Temporary Internet Files\" --exclude \"**\/Flash Player\"\n\u00a0--exclude \"**\/Temp\" --exclude \"**\/VirtualStore\" --exclude \"NTUSER.DAT*\"\n\u00a0--exclude \"UsrClass.dat*\" --exclude \"ntuser.dat*\" --exclude \"parent.lock\"\n\u00a0--exclude \"\/Mijn documenten\"  --exclude \"\/Mijn afbeeldingen\"\n\u00a0--exclude \"\/Mijn muziek\" --exclude \"\/Mijn video's\"<\/pre>\n<p style=\"padding-left: 30px;\">The \u2018Mijn Documenten\u2019 and such is a link to other dirs, so it doesn\u2019t skip them. Be sure not to use these statements when running this on Windows XP\u2026<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>Symbolic links, junction points and mount points are all reparse points:<\/p>\n<ol>\n<li>Symbolic links &#8211; kind of a shortcut to a file or folder<\/li>\n<li>Junction points &#8211; only points to a folder<\/li>\n<li>Mount points &#8211; is a folder that points to disk volume<\/li>\n<\/ol>\n<p>When doing a backup with Rsync you can exclude junction points but not restore them. A whole separate kind of script would be necessary to copy and restore the junction points. The command\u00a0MKLINK, first introduced in Vista, can be used but might not completely mimic the junction points preset in Vista and Win7.<\/p>\n<p>The AutoIT user function <a href=\"http:\/\/lcdn1.autoitscript.com\/forum\/topic\/90545-filefindex-get-more-from-filefolder-searches\/\">_FileFindEx<\/a> can identify reparse points if they exist. It might be possible to run a check for junctions, save them to a file within the directory being backed up (including a batch command to restore them), then run Rsync using that file as an &#8211;exclude file.<\/p>\n<p>At <a href=\"http:\/\/bryanpendleton.blogspot.com\/2010\/07\/windows-and-file-links.html\">http:\/\/bryanpendleton.blogspot.com\/2010\/07\/windows-and-file-links.html<\/a><\/p>\n<blockquote><p>The <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa363878.aspx\">MSDN documentation<\/a> has a fairly detailed discussion of symbolic links:<\/p>\n<p>Symbolic links can either be absolute or relative links. Absolute links are links that specify each portion of the path name; relative links are determined relative to where relative\u2013link specifiers are in a specified path.<\/p><\/blockquote>\n<p>At <a href=\"http:\/\/www.autoitscript.com\/forum\/topic\/123943-getting-size-on-disk\/\">http:\/\/www.autoitscript.com\/forum\/topic\/123943-getting-size-on-disk\/<\/a> KaFu points out:<\/p>\n<blockquote><p>FindNextFile : &#8220;If the path points to a symbolic link, the WIN32_FIND_DATA buffer contains information about the symbolic link, not the target.&#8221;<br \/>\n<a title=\"External link\" href=\"http:\/\/msdn.microsoft.com\/de-de\/library\/aa365740.aspx\" rel=\"nofollow external\">WIN32_FIND_DATA<\/a>: &#8220;If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, this member specifies the reparse point tag.&#8221;<br \/>\nIO_REPARSE_TAG_DFS<br \/>\nIO_REPARSE_TAG_DFSR<br \/>\nIO_REPARSE_TAG_HSM<br \/>\nIO_REPARSE_TAG_HSM2<br \/>\nIO_REPARSE_TAG_MOUNT_POINT<br \/>\nIO_REPARSE_TAG_SIS<br \/>\nIO_REPARSE_TAG_SYMLINK<\/p><\/blockquote>\n<p>Apparently there is a special Rsync exclude feature that uses *** three astericks, not sure about it.<br \/>\n&#8211; All Users***<br \/>\n&#8211; Default User***<\/p>\n<p>SUMMARY<\/p>\n<p>Hopefully, some of the preceding information and links can be used to help Rsync backup Vista\/Win7 machines, or even XP\/Server2003 with hard links (another story, I found that hard links aiming at another volume would delete file on that volume when Rsync went to backup the volume containing the hard links &#8230; luckily had backups but it took a long time to locate the problem and restore the files).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thanks to BigSmoke for informing me on Win7 junction points and how to skip them when using rsync (deltacopy) Finding junction files in Windows 7 and exclude them with DeltaCopy To identify junction files, run: dir \/AL \/s Here is an example exclude list for deltacopy for a standard windows 7 machine. Path names are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}